How to deploy a multi page app to share.streamlit.io

I was using streamlit-option-menu before and now i wanted to use the new multipage feature.

The name of my repository is streamlit-app. My file tree is like this:
├── requirements.txt
├── my_app
│ ├── main_page.py
│ ├── init.py
│ ├── pages
│ │ ├── page_1.py
│ │ ├── page_2.py
│ │ ├── page_3.py
│ └── utils.py

Important thing is pages from pages folder imports common utilities from utils.py. Is there a way for me to configure this setup so that my shared url
just would be :

https://share.streamlit.io/osbm/streamlit-app/main
instead of:

https://share.streamlit.io/osbm/streamlit-app/my_app/main_page.py

And also my current setup gives me this error

  File "/app/streamlit-app/my_app/pages/page_1.py", line 13, in <module>
    from my_app import utils
ModuleNotFoundError: No module named 'my_app'

I want to try to fix it, but I can’t access the link above

1 Like

Thank you for your reply, I was just trying to simplify my problem, but here is the repository:

1 Like

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