Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -120,7 +120,7 @@ def get_splade_cocondenser_representation(text):
|
|
| 120 |
for term, weight in sorted_representation:
|
| 121 |
formatted_output += f"- **{term}**: {weight:.4f}\n"
|
| 122 |
|
| 123 |
-
formatted_output += "\n---
|
| 124 |
formatted_output += f"Total non-zero terms in vector: {len(indices)}\n"
|
| 125 |
formatted_output += f"Sparsity: {1 - (len(indices) / tokenizer_splade.vocab_size):.2%}\n"
|
| 126 |
|
|
|
|
| 120 |
for term, weight in sorted_representation:
|
| 121 |
formatted_output += f"- **{term}**: {weight:.4f}\n"
|
| 122 |
|
| 123 |
+
formatted_output += "\n--- Sparse Vector Info ---\n"
|
| 124 |
formatted_output += f"Total non-zero terms in vector: {len(indices)}\n"
|
| 125 |
formatted_output += f"Sparsity: {1 - (len(indices) / tokenizer_splade.vocab_size):.2%}\n"
|
| 126 |
|