Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -123,7 +123,7 @@ def get_splade_cocondenser_representation(text):
|
|
| 123 |
terms_list.append(f"**{term}**: {weight:.4f}")
|
| 124 |
formatted_output += ", ".join(terms_list) + "."
|
| 125 |
|
| 126 |
-
info_output = f"
|
| 127 |
info_output += f"Total non-zero terms in vector: {len(indices)}\n" # Line 2 (and onwards for sparsity)
|
| 128 |
info_output += f"Sparsity: {1 - (len(indices) / tokenizer_splade.vocab_size):.2%}\n"
|
| 129 |
|
|
|
|
| 123 |
terms_list.append(f"**{term}**: {weight:.4f}")
|
| 124 |
formatted_output += ", ".join(terms_list) + "."
|
| 125 |
|
| 126 |
+
info_output = f"" # Line 1
|
| 127 |
info_output += f"Total non-zero terms in vector: {len(indices)}\n" # Line 2 (and onwards for sparsity)
|
| 128 |
info_output += f"Sparsity: {1 - (len(indices) / tokenizer_splade.vocab_size):.2%}\n"
|
| 129 |
|