Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -229,14 +229,6 @@ def save_conversation(chat_histories, session_id):
|
|
229 |
except Exception as e:
|
230 |
st.error(f"Error during Git operations: {e}")
|
231 |
|
232 |
-
# Combine chat histories from all pages
|
233 |
-
def combine_chat_histories(all_chat_histories):
|
234 |
-
all_chat_histories = [
|
235 |
-
st.session_state['chat_history_page1'],
|
236 |
-
st.session_state['chat_history_page2'],
|
237 |
-
st.session_state['chat_history_page3']
|
238 |
-
]
|
239 |
-
return all_chat_histories
|
240 |
|
241 |
def page1():
|
242 |
try:
|
@@ -336,8 +328,8 @@ def page1():
|
|
336 |
|
337 |
|
338 |
|
339 |
-
# Save the
|
340 |
-
save_conversation(
|
341 |
|
342 |
|
343 |
|
@@ -446,6 +438,7 @@ def page2():
|
|
446 |
|
447 |
st.session_state['chat_history_page2'].append(("Bot", response, "new"))
|
448 |
|
|
|
449 |
save_conversation(st.session_state['chat_history_page2'], st.session_state['session_id'], 2)
|
450 |
|
451 |
# Display new messages at the bottom
|
|
|
229 |
except Exception as e:
|
230 |
st.error(f"Error during Git operations: {e}")
|
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
|
233 |
def page1():
|
234 |
try:
|
|
|
328 |
|
329 |
|
330 |
|
331 |
+
# Save the chat historie in sepearte files
|
332 |
+
save_conversation(st.session_state['chat_history_page1'], st.session_state['session_id'], 1)
|
333 |
|
334 |
|
335 |
|
|
|
438 |
|
439 |
st.session_state['chat_history_page2'].append(("Bot", response, "new"))
|
440 |
|
441 |
+
# Save the chat historie in sepearte files
|
442 |
save_conversation(st.session_state['chat_history_page2'], st.session_state['session_id'], 2)
|
443 |
|
444 |
# Display new messages at the bottom
|