Spaces:
Building
Building
File size: 1,065 Bytes
42f8800 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
import streamlit as st
from web_app.session_manager import SessionManager
st.title("๐ Session State Reset")
st.write("## Current Session State")
st.write("Reference lists currently loaded:")
if hasattr(st.session_state, 'reference_lists') and st.session_state.reference_lists:
for name, data in st.session_state.reference_lists.items():
st.write(f"- **{name}**")
else:
st.write("No reference lists loaded")
st.write("---")
if st.button("๐๏ธ Clear All Session State", type="primary"):
# Clear all session state
for key in list(st.session_state.keys()):
del st.session_state[key]
# Reinitialize
SessionManager.initialize_session_state()
st.success("โ
Session state cleared! Please refresh the page.")
st.balloons()
st.write("### Instructions:")
st.write("1. Click 'Clear All Session State' above")
st.write("2. Refresh your browser page")
st.write("3. Go back to the Lexical Sophistication tool")
st.write("4. Re-select your reference lists")
st.write("5. You should now see smart defaults!")
|