Spaces:
Sleeping
Sleeping
mikepastor11
commited on
Commit
•
66353cd
1
Parent(s):
01f7fae
Update app.py
Browse files
app.py
CHANGED
@@ -141,6 +141,14 @@ def process_user_question(user_question):
|
|
141 |
|
142 |
# st.empty()
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
response = st.session_state.conversation({'question': user_question})
|
145 |
st.session_state.chat_history = response['chat_history']
|
146 |
results_size = len(response['chat_history'])
|
|
|
141 |
|
142 |
# st.empty()
|
143 |
|
144 |
+
try:
|
145 |
+
st.session_state.conversation({'question': ""})
|
146 |
+
# if "key" not in st.session_state:
|
147 |
+
# st.write('Good')
|
148 |
+
except:
|
149 |
+
st.error("Please upload and analyze your PDF files first!")
|
150 |
+
return
|
151 |
+
|
152 |
response = st.session_state.conversation({'question': user_question})
|
153 |
st.session_state.chat_history = response['chat_history']
|
154 |
results_size = len(response['chat_history'])
|