Restarting a Streamlit App with a Button

Hello everyone,

I’m currently working on a Streamlit app and I’m facing an issue with restarting the app using a button. I’ve tried using the st.experimental_rerun() function, but it doesn’t seem to restart the application as expected.

My requirement is to have a button that, when clicked, triggers a complete restart of the Streamlit app, resetting all the states, variables, and rendering the app from scratch. However, the st.experimental_rerun() function alone doesn’t achieve this behavior.

Hi @ttuz

Thanks for your question. Perhaps you can try out the solution from @mathcatsand (How to reset selectbox options after submitting - #2 by mathcatsand) using Session State to reset the widgets.

Best regards,

That is the reload button in the browser.