shukdevdatta123 commited on
Commit
e0e3d17
·
verified ·
1 Parent(s): cd6b7dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -69,11 +69,11 @@ def load_data(uploaded_files):
69
  # Function to save the conversation
70
  def save_conversation():
71
  if st.session_state.username:
 
 
 
 
72
  with open("conversations.json", "a") as f:
73
- conversation_entry = {
74
- "username": st.session_state.username,
75
- "messages": st.session_state.messages
76
- }
77
  json.dump(conversation_entry, f)
78
  f.write("\n")
79
  else:
@@ -182,4 +182,4 @@ if st.session_state.show_conversations:
182
  else:
183
  st.sidebar.write("No previous conversations found.")
184
  else:
185
- st.sidebar.write("Previous conversations are hidden. Click 'Toggle Previous Conversations' to show.")
 
69
  # Function to save the conversation
70
  def save_conversation():
71
  if st.session_state.username:
72
+ conversation_entry = {
73
+ "username": st.session_state.username,
74
+ "messages": st.session_state.messages
75
+ }
76
  with open("conversations.json", "a") as f:
 
 
 
 
77
  json.dump(conversation_entry, f)
78
  f.write("\n")
79
  else:
 
182
  else:
183
  st.sidebar.write("No previous conversations found.")
184
  else:
185
+ st.sidebar.write("Previous conversations are hidden. Click 'Toggle Previous Conversations' to show.")