Spaces:
Sleeping
Sleeping
update streamlit_app.py 4
Browse files- streamlit_app.py +4 -1
streamlit_app.py
CHANGED
@@ -22,7 +22,10 @@ def main():
|
|
22 |
# Button to clear chat history
|
23 |
if st.button("Clear Chat History"):
|
24 |
st.session_state.messages = []
|
25 |
-
st
|
|
|
|
|
|
|
26 |
|
27 |
# Initialize session state
|
28 |
if "messages" not in st.session_state:
|
|
|
22 |
# Button to clear chat history
|
23 |
if st.button("Clear Chat History"):
|
24 |
st.session_state.messages = []
|
25 |
+
if hasattr(st, "rerun"):
|
26 |
+
st.rerun()
|
27 |
+
else:
|
28 |
+
st.experimental_rerun()
|
29 |
|
30 |
# Initialize session state
|
31 |
if "messages" not in st.session_state:
|