eagle0504 commited on
Commit
47954f5
Β·
verified Β·
1 Parent(s): 2c45d48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -96,6 +96,12 @@ for message in st.session_state.messages:
96
  with st.chat_message(message["role"]):
97
  st.markdown(message["content"])
98
 
 
 
 
 
 
 
99
  # React to user input
100
  if prompt := st.chat_input("πŸ˜‰ Ask any question or feel free to use the examples provided in the left sidebar."):
101
 
 
96
  with st.chat_message(message["role"]):
97
  st.markdown(message["content"])
98
 
99
+ # Display chat messages from history on app rerun
100
+ for message in st.session_state.messages:
101
+ if message["role"] != "system": # Skip system messages
102
+ with st.chat_message(message["role"]):
103
+ st.markdown(message["content"])
104
+
105
  # React to user input
106
  if prompt := st.chat_input("πŸ˜‰ Ask any question or feel free to use the examples provided in the left sidebar."):
107