Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -85,14 +85,14 @@ def search(query):
|
|
| 85 |
|
| 86 |
# Output of top-N hits from bi-encoder
|
| 87 |
st.write("\n-------------------------\n")
|
| 88 |
-
st.
|
| 89 |
hits = sorted(hits, key=lambda x: x['score'], reverse=True)
|
| 90 |
for hit in hits[0:maxtags_sidebar]:
|
| 91 |
st.write("\t{:.3f}\t{}".format(hit['score'], passages[hit['corpus_id']].replace("\n", " ")))
|
| 92 |
|
| 93 |
# Output of top-N hits from re-ranker
|
| 94 |
st.write("\n-------------------------\n")
|
| 95 |
-
st.
|
| 96 |
hits = sorted(hits, key=lambda x: x['cross-score'], reverse=True)
|
| 97 |
for hit in hits[0:maxtags_sidebar]:
|
| 98 |
st.write("\t{:.3f}\t{}".format(hit['cross-score'], passages[hit['corpus_id']].replace("\n", " ")))
|
|
@@ -100,4 +100,4 @@ def search(query):
|
|
| 100 |
st.write("## Results:")
|
| 101 |
if st.button('Generated Expansion'):
|
| 102 |
out = search(query = user_query)
|
| 103 |
-
st.success(out)
|
|
|
|
| 85 |
|
| 86 |
# Output of top-N hits from bi-encoder
|
| 87 |
st.write("\n-------------------------\n")
|
| 88 |
+
st.subheader("Top-N Bi-Encoder Retrieval hits")
|
| 89 |
hits = sorted(hits, key=lambda x: x['score'], reverse=True)
|
| 90 |
for hit in hits[0:maxtags_sidebar]:
|
| 91 |
st.write("\t{:.3f}\t{}".format(hit['score'], passages[hit['corpus_id']].replace("\n", " ")))
|
| 92 |
|
| 93 |
# Output of top-N hits from re-ranker
|
| 94 |
st.write("\n-------------------------\n")
|
| 95 |
+
st.subheader("Top-N Cross-Encoder Re-ranker hits")
|
| 96 |
hits = sorted(hits, key=lambda x: x['cross-score'], reverse=True)
|
| 97 |
for hit in hits[0:maxtags_sidebar]:
|
| 98 |
st.write("\t{:.3f}\t{}".format(hit['cross-score'], passages[hit['corpus_id']].replace("\n", " ")))
|
|
|
|
| 100 |
st.write("## Results:")
|
| 101 |
if st.button('Generated Expansion'):
|
| 102 |
out = search(query = user_query)
|
| 103 |
+
#st.success(out)
|