Spaces:
Sleeping
Sleeping
Commit
·
48bab4b
1
Parent(s):
b0f64e3
switched to spinner
Browse files
app.py
CHANGED
|
@@ -191,9 +191,10 @@ def answer_callback(question_query):
|
|
| 191 |
global docs
|
| 192 |
# global pdf_info
|
| 193 |
progress_text = "Please wait..."
|
| 194 |
-
my_bar = st.progress(0, text = progress_text)
|
|
|
|
| 195 |
if docs is None:
|
| 196 |
-
my_bar.progress(0.2, "Please wait...")
|
| 197 |
pdf_info = st.session_state['pdf_info']
|
| 198 |
print('buliding docs')
|
| 199 |
docs = paperqa.Docs()
|
|
@@ -207,7 +208,8 @@ def answer_callback(question_query):
|
|
| 207 |
# docs._build_faiss_index()
|
| 208 |
answer = docs.query(question_query)
|
| 209 |
# print(answer.formatted_answer)
|
| 210 |
-
my_bar.progress(1.0, "Done!")
|
|
|
|
| 211 |
return answer.formatted_answer
|
| 212 |
|
| 213 |
|
|
|
|
| 191 |
global docs
|
| 192 |
# global pdf_info
|
| 193 |
progress_text = "Please wait..."
|
| 194 |
+
# my_bar = st.progress(0, text = progress_text)
|
| 195 |
+
st.spinner(text="Please wait...")
|
| 196 |
if docs is None:
|
| 197 |
+
# my_bar.progress(0.2, "Please wait...")
|
| 198 |
pdf_info = st.session_state['pdf_info']
|
| 199 |
print('buliding docs')
|
| 200 |
docs = paperqa.Docs()
|
|
|
|
| 208 |
# docs._build_faiss_index()
|
| 209 |
answer = docs.query(question_query)
|
| 210 |
# print(answer.formatted_answer)
|
| 211 |
+
# my_bar.progress(1.0, "Done!")
|
| 212 |
+
st.success('Done!')
|
| 213 |
return answer.formatted_answer
|
| 214 |
|
| 215 |
|