Periodic functions in streamlit

I’m using streamlit to display the results of the models that I have run the input, I’m displaying them in the table. Now I want the table data (fetching from database) to be updated every [10, 30, 60] t seconds such that the user can see the results automatically.

Hi @Naveen_Chekkapalli . According to my knowledge you can use st.spinner with your time limit and once spinner gets completed display the results.

Thanks for the reply @Guna_Sekhar_Venkata, But my requirement is I want to fetch the results every t seconds and show the results in the table.
Something like setIntervalTimeout in js.

Then its not possible. Definitely there must be a some time frame gap. If not every time you need to rerun the page using st.experimental_rerun()!!!

Take a look at this blog post.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.