I started using Streamlit in one of my projects and immediately fell in love with it. But I got a problem that really bothers me, so any help would be greatly appreciated.
My code flows like this:
- Load data from files
- Do some computation and results populate a list
- When use selects an item from the list, some relevant text would be printed out as text.
My problem is that, every time I select a new item from the list, the entire script reruns from the beginning, including data loading and computation, which is uncalled for and time consuming.
How can I make it just update the text printing part when I choose a new item from the list?
Thanks in advance!