Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -119,15 +119,16 @@ def main():
|
|
119 |
query = st.text_input("Enter your query:")
|
120 |
|
121 |
try:
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
|
|
131 |
|
132 |
except EOFError:
|
133 |
pass
|
|
|
119 |
query = st.text_input("Enter your query:")
|
120 |
|
121 |
try:
|
122 |
+
if query != "":
|
123 |
+
with st.spinner("Searching..."):
|
124 |
+
results = show_model(query)
|
125 |
+
|
126 |
+
#Output passages & scores
|
127 |
+
for doc, score, title in results[:10]:
|
128 |
+
st.write("Score: ", score)
|
129 |
+
st.write("Title:", title)
|
130 |
+
st.write("Abstract:", abstract)
|
131 |
+
st.write("---")
|
132 |
|
133 |
except EOFError:
|
134 |
pass
|