CarlosMalaga
commited on
Commit
•
b2fefbd
1
Parent(s):
75613fc
Update app.py
Browse files
app.py
CHANGED
@@ -382,13 +382,14 @@ def run_client():
|
|
382 |
if selection_list == "Top-k DB in Taxonomy Intervention" or selection_list == "Top-k DB in Taxonomy Outcome":
|
383 |
response = relik_model.retrieve(text, k=50, batch_size=400, progress_bar=False)
|
384 |
candidates_text = [pred.document.text for pred in response[0] if pred.document.text in db_set]
|
|
|
385 |
else:
|
386 |
-
response = relik_model.retrieve(text, k=
|
387 |
-
candidates_text = [pred.document.text for pred in response[0]]
|
388 |
-
|
389 |
|
390 |
if candidates_text:
|
391 |
-
st.session_state.candidates = candidates_text
|
392 |
|
393 |
else:
|
394 |
st.session_state.candidates = []
|
|
|
382 |
if selection_list == "Top-k DB in Taxonomy Intervention" or selection_list == "Top-k DB in Taxonomy Outcome":
|
383 |
response = relik_model.retrieve(text, k=50, batch_size=400, progress_bar=False)
|
384 |
candidates_text = [pred.document.text for pred in response[0] if pred.document.text in db_set]
|
385 |
+
candidates_text = candidates_text[:10]
|
386 |
else:
|
387 |
+
response = relik_model.retrieve(text, k=20, batch_size=400, progress_bar=False)
|
388 |
+
candidates_text = [pred.document.text for pred in response[0]]
|
389 |
+
|
390 |
|
391 |
if candidates_text:
|
392 |
+
st.session_state.candidates = candidates_text
|
393 |
|
394 |
else:
|
395 |
st.session_state.candidates = []
|