Hi @Eric,
Perhaps you could structure your app as a multipage app. This could be done by creating a directory called pages
and moving cleanup.py
, sentiment.py
and sql.py
into it. As for various utility functions you can house it within a utility.py
and import them.
I’ve created a simple example of a multipage app that you can try out:
- GitHub repo of the example multipage app GitHub - dataprofessor/st-multipage
- Try out the Demo app https://dataprofessor-st-multipage-home-1eb79e.streamlitapp.com/
Below is an example of the directory structure of the example multipage app.
├─ .streamlit
│ └─ config.toml
├─ pages
│ ├─ 1_🍎_Apples.py
│ ├─ 2_🍊_Oranges.py
│ └─ 3_🍐_Pear.py
├─ tools
│ └─ utility.py
├─ Home.py
├─ README.md
├─ packages.txt
├─ requirements.txt
└─ utilities.py
Resources to check out about Multipage apps: