Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -92,11 +92,11 @@ def search(query):
|
|
| 92 |
hits[idx]['cross-score'] = cross_scores[idx]
|
| 93 |
|
| 94 |
# Output of top-N hits from bi-encoder
|
| 95 |
-
st.write("\n-------------------------\n")
|
| 96 |
-
st.subheader("Top-N Bi-Encoder Retrieval hits")
|
| 97 |
-
hits = sorted(hits, key=lambda x: x['score'], reverse=True)
|
| 98 |
-
for hit in hits[0:maxtags_sidebar]:
|
| 99 |
-
|
| 100 |
|
| 101 |
# Output of top-N hits from re-ranker
|
| 102 |
st.write("\n-------------------------\n")
|
|
@@ -110,9 +110,9 @@ def search(query):
|
|
| 110 |
if q not in hit_res:
|
| 111 |
hit_res.append(q)
|
| 112 |
for res in hit_res[0:maxtags_sidebar]:
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
|
| 117 |
st.write("## Results:")
|
| 118 |
if st.button('Generated Expansion'):
|
|
|
|
| 92 |
hits[idx]['cross-score'] = cross_scores[idx]
|
| 93 |
|
| 94 |
# Output of top-N hits from bi-encoder
|
| 95 |
+
#st.write("\n-------------------------\n")
|
| 96 |
+
#st.subheader("Top-N Bi-Encoder Retrieval hits")
|
| 97 |
+
#hits = sorted(hits, key=lambda x: x['score'], reverse=True)
|
| 98 |
+
#for hit in hits[0:maxtags_sidebar]:
|
| 99 |
+
# st.write("\t{:.3f}\t{}".format(hit['score'], passages[hit['corpus_id']].replace("\n", " ")))
|
| 100 |
|
| 101 |
# Output of top-N hits from re-ranker
|
| 102 |
st.write("\n-------------------------\n")
|
|
|
|
| 110 |
if q not in hit_res:
|
| 111 |
hit_res.append(q)
|
| 112 |
for res in hit_res[0:maxtags_sidebar]:
|
| 113 |
+
keywords = custom_kw_extractor.extract_keywords(res)
|
| 114 |
+
for kw in keywords:
|
| 115 |
+
st.write(kw)
|
| 116 |
|
| 117 |
st.write("## Results:")
|
| 118 |
if st.button('Generated Expansion'):
|