Spaces:
Sleeping
Sleeping
add clear history functionality
Browse files
app.py
CHANGED
|
@@ -53,6 +53,10 @@ def main():
|
|
| 53 |
st.session_state.selected_task = selected_task
|
| 54 |
st.rerun()
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
# Main content area
|
| 58 |
# Initialize model with the selected configuration
|
|
|
|
| 53 |
st.session_state.selected_task = selected_task
|
| 54 |
st.rerun()
|
| 55 |
|
| 56 |
+
# Clear chat history button
|
| 57 |
+
if st.button("Clear Chat History"):
|
| 58 |
+
st.session_state.messages = [] # Clear the chat history
|
| 59 |
+
st.success("Chat history cleared!")
|
| 60 |
|
| 61 |
# Main content area
|
| 62 |
# Initialize model with the selected configuration
|