Hello there I need someone help me with this problem

Hi I have a problem with my app in Streamlit when I open it, it opens on the second page not on the first page how can I fix this, and the second thing is it’s too slow when I move to the next page here is the link https://mainpy-hhbha7h3aconepktpolcgz.streamlit.app/

Hi @hussein199623

On line 83,

default_index=1,

can you change it to:

default_index=0,

as Python starts its numbering from 0.

Hope this helps!

Thanks a lot, it works, what about fixing the speed because it so slow when i run something

Hi @hussein199623

Glad to hear that the index is now fixed, as for the speed, there could be many cause.

Firstly, it could be a page changing mechanism issue that the creator of the streamlit_option_menu component would have to optimize.

Secondly, it could be that the page is taking time to perform calculations or loading of page elements. To figure out which part is lagging you can use a profiler such as streamlit-profiler (streamlit-profiler Β· PyPI)

Thirdly, caching of data or costly page elements could be cached via st.cache_data or st.cache_resource.

Hope this helps!

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