I have two users that wanna have different views of data so I’d like to add a toggle that will toggle between the two differing views (it’s a very minor difference). But I would like streamlit to remember what the user’s toggle selection is so next time they come to app they don’t need to toggle it every time.
Is there a way for streamlit to remember or cache this instead of resetting to a default selection when they leave the app?
For example, if I have this radio widget:
selection = st.sidebar.radio(
“What’s your favorite movie genre”,
(‘Comedy’, ‘Drama’, ‘Documentary’))
If a user selects the Drama option, use the app and leaves the page. I want the Drama option to be selected upon their return.