Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -117,21 +117,18 @@ def main():
|
|
117 |
st.write("## Results and Demo")
|
118 |
|
119 |
query = st.text_input("Enter your query:")
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
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 |
-
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
|
137 |
|
|
|
117 |
st.write("## Results and Demo")
|
118 |
|
119 |
query = st.text_input("Enter your query:")
|
120 |
+
|
121 |
+
if query != "":
|
122 |
+
with st.spinner("Searching..."):
|
123 |
+
results = show_model(query)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
+
#Output passages & scores
|
126 |
+
for doc, score, title in results[:10]:
|
127 |
+
st.write("Score: ", score)
|
128 |
+
st.write("Title:", title)
|
129 |
+
st.write("Abstract:", abstract)
|
130 |
+
st.write("---")
|
131 |
+
|
132 |
|
133 |
|
134 |
|