Spaces:
Sleeping
Sleeping
Commit
·
299f907
1
Parent(s):
4128cf7
Stupid proress bar
Browse files
app.py
CHANGED
@@ -190,9 +190,9 @@ if searchButton:
|
|
190 |
def answer_callback(question_query):
|
191 |
global docs
|
192 |
# global pdf_info
|
193 |
-
my_bar = st.progress(0,
|
194 |
if docs is None:
|
195 |
-
my_bar.progress(0.2,
|
196 |
pdf_info = st.session_state['pdf_info']
|
197 |
print('buliding docs')
|
198 |
docs = paperqa.Docs()
|
@@ -206,7 +206,7 @@ def answer_callback(question_query):
|
|
206 |
# docs._build_faiss_index()
|
207 |
answer = docs.query(question_query)
|
208 |
# print(answer.formatted_answer)
|
209 |
-
my_bar.progress(1.0,
|
210 |
return answer.formatted_answer
|
211 |
|
212 |
|
|
|
190 |
def answer_callback(question_query):
|
191 |
global docs
|
192 |
# global pdf_info
|
193 |
+
my_bar = st.progress(0, "Please wait...")
|
194 |
if docs is None:
|
195 |
+
my_bar.progress(0.2, "Please wait...")
|
196 |
pdf_info = st.session_state['pdf_info']
|
197 |
print('buliding docs')
|
198 |
docs = paperqa.Docs()
|
|
|
206 |
# docs._build_faiss_index()
|
207 |
answer = docs.query(question_query)
|
208 |
# print(answer.formatted_answer)
|
209 |
+
my_bar.progress(1.0, "Done!")
|
210 |
return answer.formatted_answer
|
211 |
|
212 |
|