Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -141,14 +141,18 @@ def process_user_question(user_question):
|
|
| 141 |
|
| 142 |
# st.empty()
|
| 143 |
|
| 144 |
-
try:
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 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'])
|
|
|
|
| 141 |
|
| 142 |
# st.empty()
|
| 143 |
|
| 144 |
+
# try:
|
| 145 |
+
# st.session_state.conversation({'question': "Summarize the document"})
|
| 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 |
+
if st.session_state.conversation == None:
|
| 153 |
st.error("Please upload and analyze your PDF files first!")
|
| 154 |
return
|
| 155 |
+
|
| 156 |
response = st.session_state.conversation({'question': user_question})
|
| 157 |
st.session_state.chat_history = response['chat_history']
|
| 158 |
results_size = len(response['chat_history'])
|