About streamlit application re running everytime there is a user_interaction

Rerunning with every interaction is the basic structure of Streamlit.

You can put widgets into a form if you have a collection that you want a user to set before rureunning:

You can also use caching and session state to skip over parts of your code on rerun for efficiency.

After you check out those resources and maybe main concepts if you haven’t yet, feel free to edit your post so your code is formatted correctly. This will make it much easier for community members to see what you are working with. :slight_smile:

image

2 Likes