crystina-z commited on
Commit
6c34254
·
1 Parent(s): b8c5764

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -77,15 +77,15 @@ def aggregate(list_of_hits):
77
  for doc in list_of_hits[0]:
78
  rank2doc[doc["rank"]] = doc
79
  return [rank2doc[rank] for rank in y_optimal]
80
-
 
81
 
82
  if search_query or button_clicked:
83
-
84
  num_results = None
85
  t_0 = time.time()
86
- search_results = query2outputs[search_query][0] # first from the 20
87
-
88
- print(len(search_results), type(search_results[0]))
89
 
90
  st.write(
91
  f'<p align=\"right\" style=\"color:grey;\"> Before aggregation for query [{search_query}] ms</p>', unsafe_allow_html=True)
 
77
  for doc in list_of_hits[0]:
78
  rank2doc[doc["rank"]] = doc
79
  return [rank2doc[rank] for rank in y_optimal]
80
+
81
+ aggregated_ranking = aggregate(query2outputs[search_query])
82
 
83
  if search_query or button_clicked:
84
+
85
  num_results = None
86
  t_0 = time.time()
87
+ # search_results = query2outputs[search_query][0] # first from the 20
88
+ search_results = aggregated_ranking
 
89
 
90
  st.write(
91
  f'<p align=\"right\" style=\"color:grey;\"> Before aggregation for query [{search_query}] ms</p>', unsafe_allow_html=True)