Cannot import local module on streamlit cloud

Cannot import local module on streamlit cloud.
My app is using functions in other folders ouside app.py but of course in my package.
Cannot deploy it on streamlit cloud

in local it’s working all fine

It may have to do with where you are running the streamlit run command from locally vs where it’s run from on Cloud.

Could you try making the import relative to the app.py’s path, like this and see if that resolves the issue?

from ..interface.main import text_generation

I tried. but it does not work locally anymore this way

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