Hello! Very new to streamlit but really enjoying learning more and working with this amazing product.
I’m attempting to make a simple interface that allows for a user to fine tune some elements for song recommendations.
Apologies if there is already an existing thread for this, was unable to locate anything concrete. I was wondering how one would be able to collapse, hide, or delete a widget upon button click. Ideally, after pressing “Get recommendations” I’d like the multiselect and other widgets to be hidden or deleted.
I currently have:
filter_options = st.multiselect("Select Desired Filters", ["Tempo", "Key", "Danceability", "Energy", "Instrumentalness", "Valence"], key='1')
final_filters = get_filters(filter_options)
if st.button("Get Recommendations 🎵"):
r = get_recs(final_filters, search_track_dict)
where the widgets used for filtering are created and values from them are retrieved in the call to get_filters(). Not sure if there is a way to do this utilizing st.empty() or other, but any help would be appreciated. Thanks!
streamlit v 0.71, python 3.9