Spaces:
Running
Running
Update app.py
Browse files
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 |
|