etadevosyan commited on
Commit
621ac26
1 Parent(s): 86a77c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,8 +29,8 @@ def predict_bm25(service):
29
  scores = doc_scores[sorted_doc_indices]
30
  scores_filtered = np.argwhere(scores>1).reshape(-1)
31
  filtered_local_names = sorted_local_names[scores_filtered.tolist()].tolist()
32
- if len(filtered_local_names)>5:
33
- filtered_local_names = filtered_local_names[:5]
34
  return filtered_local_names
35
 
36
  demo = gr.Interface(fn=predict_bm25,inputs=gr.components.Textbox(label='Запрос пользователя'),
 
29
  scores = doc_scores[sorted_doc_indices]
30
  scores_filtered = np.argwhere(scores>1).reshape(-1)
31
  filtered_local_names = sorted_local_names[scores_filtered.tolist()].tolist()
32
+ if len(filtered_local_names)>3:
33
+ filtered_local_names = filtered_local_names[:3]
34
  return filtered_local_names
35
 
36
  demo = gr.Interface(fn=predict_bm25,inputs=gr.components.Textbox(label='Запрос пользователя'),