If nothing else, you can call st.experimental_rerun()
to force the script to rerun.
However, if you interact with a widget the whole script is rerun, which typically means you shouldn’t need to use experimental_rerun. If something is happening behind the scenes that is changing a variable, then it gets more tricky, and you may need to use experimental_rerun
.
If you have a simple case like this:
x = st.slider("Pick a number")
st.write(x)
then the app will update automatically as the slider changes.