Here You go -
var1 = st.empty()
var2 = st.empty()
var3 = st.empty()
filter_options = var1 .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)
var1.empty()
var2.empty()
var3.empty()
But it looks nasty if you ask me. There is another way using beta_container()
which you can see here
which would be elegant but that has succumbed to a glitch.