LTEnjoy commited on
Commit
9d5b835
1 Parent(s): e09c5c5

Update demo/modules/search.py

Browse files
Files changed (1) hide show
  1. 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, max(topk, nprobe*256))
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