Phaneendrabayi commited on
Commit
64eaaba
·
verified ·
1 Parent(s): f2f607e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -118,7 +118,6 @@ if "user_id" not in st.session_state:
118
  if user_id:
119
  st.session_state.user_id = user_id
120
  authenticated = True
121
- st.experimental_rerun()
122
  else:
123
  st.error("Invalid username or password.")
124
 
@@ -139,12 +138,10 @@ if authenticated:
139
  st.write(f"Logged in as: {username}")
140
  if st.button("Logout"):
141
  del st.session_state.user_id
142
- st.experimental_rerun()
143
 
144
  # Clear chat button
145
  if st.button("Clear Chat"):
146
  clear_chat_history(st.session_state.user_id)
147
- st.experimental_rerun()
148
 
149
  # Display chat history with delete buttons
150
  history_store = get_history_store(st.session_state.user_id)
@@ -159,7 +156,7 @@ if authenticated:
159
  with col2:
160
  if st.button("🗑️", key=chat.content[:20]):
161
  delete_chat_message(st.session_state.user_id, chat.content)
162
- st.experimental_rerun()
163
 
164
  # Chat input
165
  user_input = st.chat_input("Type your message...")
 
118
  if user_id:
119
  st.session_state.user_id = user_id
120
  authenticated = True
 
121
  else:
122
  st.error("Invalid username or password.")
123
 
 
138
  st.write(f"Logged in as: {username}")
139
  if st.button("Logout"):
140
  del st.session_state.user_id
 
141
 
142
  # Clear chat button
143
  if st.button("Clear Chat"):
144
  clear_chat_history(st.session_state.user_id)
 
145
 
146
  # Display chat history with delete buttons
147
  history_store = get_history_store(st.session_state.user_id)
 
156
  with col2:
157
  if st.button("🗑️", key=chat.content[:20]):
158
  delete_chat_message(st.session_state.user_id, chat.content)
159
+
160
 
161
  # Chat input
162
  user_input = st.chat_input("Type your message...")