Update app.py
Browse files
app.py
CHANGED
@@ -29,9 +29,9 @@ if st.button('Run keyword search'):
|
|
29 |
'confidence': hit['_score']} for hit in top_5_hits ]
|
30 |
|
31 |
for i, doc_hit in enumerate(top_5_text):
|
32 |
-
st.
|
33 |
-
st.
|
34 |
-
st.markdown(f'(confidence score
|
35 |
|
36 |
st.write(f'Answer JSON: '); st.write(top_5_text) # st.write(qa_result)
|
37 |
else:
|
|
|
29 |
'confidence': hit['_score']} for hit in top_5_hits ]
|
30 |
|
31 |
for i, doc_hit in enumerate(top_5_text):
|
32 |
+
st.subheader(f'Search result #{i+1} (and score):')
|
33 |
+
st.write(f'<em>{doc_hit["text"]}...</em>')
|
34 |
+
st.markdown(f'> (*confidence score*: **{format(doc_hit["confidence"], ".3f")}**)')
|
35 |
|
36 |
st.write(f'Answer JSON: '); st.write(top_5_text) # st.write(qa_result)
|
37 |
else:
|