Run app only after users enters all inputs

I have a python app that takes multiple inputs from the user and then runs the program. But on Streamlut the app seems to run after each input is added… I want the program to run only after the user has submitted all inputs and hits the “Submit” button.

Also, the program seems to self execute each time the page is reloaded. How do I prevent this?

Hi @Ajay_Chakravarthy -

Yes, it is possible to have the results gated based on clicking a submit button. If I’m not mistaken (I can’t find it as this exact moment), @synode has created an example of this along with using our shared state workaround.

This is a fundamental property of the Streamlit architecture, so it’s not something that can be turned off. In this post, I briefly discuss the design decision for having the refresh model vs. the callback model:

Best,
Randy