How to waiting multipage app?

Hi.

I’m using multipage app in streamlit

SO I have main.py file and pages folder have 1_Keyword_Demo.py, 2_Word_Cloud_Demo.py file

I think that multipage app is running at the same time
But I must run first main.py file and after running 1_Keyword_Demo.py file
BCZ main.py file is reading file in s3 after give 1_Keyword_Demo

So How to do that?
WHen main.py file running finished Then another pages running

Hi @lima4,

To be sure: are you asking if other pages could only be shown after the S3 file has been successfully read?

Thanks,
Charly

1 Like

Hi @lima4

It seems you want the main.py page to run first in order to read data from S3, then you want that data to persist to other pages?

If so, you can try caching the data via `@st.cache_data (st.cache_data - Streamlit Docs) and/or assign it as a session state variable from which you can call in other pages of the app.

More details on session states here:

Hope this helps!

1 Like