When I tried to deploy it to Streamlit, I got the following error:
File "/app/disaster-response-pipeline-project/app/run.py", line 21, in <module>
from app.classDefs import ItemSelector, tokenize, StartingVerbExtractor, MessageLengthExtractor # Heroku
ModuleNotFoundError: No module named 'app'
Even when I tried to remove “app.” from the above mentioned line, I got another error.
If you do end up recreating it as a streamlit app, you will need to make a few changes.
As you noticed, from app.classDefs doesn’t work – you will need to change this to from classDefs instead, since streamlit will be run from inside the app/ folder.
Replace your flask routes with regular functions, and call them in the course of your streamlit app running.
You should be able to test it locally by going into the app/ folder and doing streamlit run run.py
Hi @blackary ,
All noted with thanks.
I’ll read about Streamlit apps. I thought it’s possible to deply Flask apps, as with other deployment sites.
Thanks a lot.