Issue Loading KERAS Model

I’m having problem loading keras model getting this error only on streamlit cloud
" Traceback:

File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 552, in _run_script
exec(code, module.dict)File “/mount/src/early_autism_image_detection/main.py”, line 23, in
model = tf.keras.models.load_model(‘autism_74.h5’)File “/home/adminuser/venv/lib/python3.9/site-packages/keras/src/saving/saving_api.py”, line 238, in load_model
return legacy_sm_saving_lib.load_model(File “/home/adminuser/venv/lib/python3.9/site-packages/keras/src/utils/traceback_utils.py”, line 70, in error_handler
raise e.with_traceback(filtered_tb) from NoneFile “/home/adminuser/venv/lib/python3.9/site-packages/h5py/_hl/files.py”, line 567, in init
fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)File “/home/adminuser/venv/lib/python3.9/site-packages/h5py/_hl/files.py”, line 231, in make_fid
fid = h5f.open(name, flags, fapl=fapl)File “h5py/_objects.pyx”, line 54, in h5py._objects.with_phil.wrapperFile “h5py/_objects.pyx”, line 55, in h5py._objects.with_phil.wrapperFile “h5py/h5f.pyx”, line 106, in h5py.h5f.open

It seems like there might be an issue with loading your Keras model in Streamlit Cloud. A potential solution is to double-check the file path and ensure that your model file 'autism_74.h5' is uploaded correctly and is within the allowed size limits of Streamlit Cloud.

Additionally, consider reaching out to Streamlit Cloud support for specific guidance on resolving this issue within their environment. They might have insights or solutions tailored to their platform.

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