Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ def get_top_chunks(query, chunk_embeddings, text_chunks): # Return top 3 text ch
|
|
| 50 |
similarities = torch.matmul(chunk_embeddings_normalized,query_embedding_normalized)
|
| 51 |
print(similarities)
|
| 52 |
|
| 53 |
-
top_indices = torch.topk(similarities, k=
|
| 54 |
print(top_indices)
|
| 55 |
|
| 56 |
top_chunks = []
|
|
|
|
| 50 |
similarities = torch.matmul(chunk_embeddings_normalized,query_embedding_normalized)
|
| 51 |
print(similarities)
|
| 52 |
|
| 53 |
+
top_indices = torch.topk(similarities, k=1).indices
|
| 54 |
print(top_indices)
|
| 55 |
|
| 56 |
top_chunks = []
|