Error loading keras file

I trained models using Jupyter Noteboook and am trying to make a Streamlit app. It seems like it cannot find my keras files when I deploy on Streamlit Cloud, even though it works fine on my local machine.

This is the error I get:
Error loading the model: File not found: filepath=lesson1.keras. Please ensure the file is an accessible .keras zip file.

My .keras files are all in a folder called models in PyCharm. I’m sure I’m doing something completely silly but I cannot figure how to fix it.

Here is the link to my code:

Any help would be greatly appreciated!!

Hello, I have encountered the same issue
If you found a solution to it, can you please share it?
Best wishes

I never got my keras files to just work from GitHub unfortunately. I did however have luck in using Google Cloud to store and pull them from. I followed this tutorial on how to connect a database but the concept is the same.

(Connect Streamlit to Google Cloud Storage - Streamlit Docs)

1 Like

Thank you!

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