Update demo/modules/search.py
Browse files- demo/modules/search.py +1 -1
demo/modules/search.py
CHANGED
@@ -100,7 +100,7 @@ def search(input: str, nprobe: int, topk: int, input_type: str, query_type: str,
|
|
100 |
raise gr.Error(f"You cannot retrieve more than the database size ({index.ntotal}).")
|
101 |
|
102 |
# Retrieve all scores to plot the distribution
|
103 |
-
scores, ranks = index.search(input_embedding,
|
104 |
scores, ranks = scores[0], ranks[0]
|
105 |
|
106 |
# Remove inf values
|
|
|
100 |
raise gr.Error(f"You cannot retrieve more than the database size ({index.ntotal}).")
|
101 |
|
102 |
# Retrieve all scores to plot the distribution
|
103 |
+
scores, ranks = index.search(input_embedding, index.ntotal)
|
104 |
scores, ranks = scores[0], ranks[0]
|
105 |
|
106 |
# Remove inf values
|