Liu Hong Yuan Tom commited on
Commit
0878577
·
verified ·
1 Parent(s): 5ca42d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -140,7 +140,11 @@ valid_model_names = [model.id for model in Groq().models.list().data if not mode
140
  st.markdown("<a href='https://groq.com'><img src='app/static/banner.png' width='500'></a>", unsafe_allow_html=True)
141
  st.write("---")
142
 
143
-
 
 
 
 
144
 
145
  # Initialize session state
146
  if "messages" not in st.session_state:
 
140
  st.markdown("<a href='https://groq.com'><img src='app/static/banner.png' width='500'></a>", unsafe_allow_html=True)
141
  st.write("---")
142
 
143
+ # Reset chat
144
+ def reset_conversation():
145
+ st.session_state.conversation = None
146
+ st.session_state.chat_history = None
147
+ st.button('Reset Chat', on_click=reset_conversation)
148
 
149
  # Initialize session state
150
  if "messages" not in st.session_state: