I am trying to load my model with this code:
`# Load the model with open('tomato_model.pkl', 'rb') as model_file: #from keras.models import load_model model = pickle.load(model_file)`
But it kept on returning this errror:
#ModuleNotFoundError: No module named 'keras.src' Traceback: File "C:\Users\CleanTech\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script exec(code, module.__dict__) File "C:\Users\CleanTech\Desktop\Tomatoe\tomato.py", line 156, in <module> model = pickle.load(model_file)
^^^^^^^^^^^^^^^^^^^^^^^
And there's no where in my code or model with such module named 'keras.src'
Alternatively I tried using:
with open('tomato_model.pkl', 'rb') as model_file: from keras.models import load_model model = load(model_file)
Still my streamlit
could not load rather throwing error.