ModuleNotFoundError: No module named 'keras'

I am facing this issue when I am trying to deploy the app. It is working just fine on local host.

error:


requirements.txt:

code to load model:

How do I resolve this? Help would be much appreciated

Hi there,

Thanks for sharing this question! We actually have an FAQ about this topic – please check it out: FAQ: ModuleNotFoundError.

Also, perhaps you can try changing Keras to keras in your requirements.txt file.

Happy Streamlit-ing! :balloon:

I forked your repo at 765f55b and deployed without issues. You may need to reboot or redeploy the application.

Yes! Solved the problem, had to include tensorflow in the requirement.txt. Although I still don’t know why building dependencies was causing an error before

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