I am trying to deploy a lung abnormality detection app where the user submits a radiograph and the model detects abnormalities. The app works beautifully on my local computer, but is not working at deployment with the error below. Anyone have any ideas?
Current working directory: /mount/src/chest-x-ray-abnormality-detection-multi-label-cnn
Model file path: /mount/src/chest-x-ray-abnormality-detection-multi-label-cnn/final_df.pkl
FileNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if youâre on Streamlit Cloud, click on âManage appâ in the lower right of your app).
Traceback:
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
exec(code, module.__dict__)File "/mount/src/chest-x-ray-abnormality-detection-multi-label-cnn/lung_abnormality_detection_app.py", line 23, in <module>
loaded_model = joblib.load(model_file)
^^^^^^^^^^^^^^^^^^^^^^^File "/home/adminuser/venv/lib/python3.11/site-packages/joblib/numpy_pickle.py", line 648, in load
obj = _unpickle(fobj)
^^^^^^^^^^^^^^^File "/home/adminuser/venv/lib/python3.11/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle
obj = unpickler.load()
^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/pickle.py", line 1213, in load
dispatch[key[0]](self)File "/usr/local/lib/python3.11/pickle.py", line 1590, in load_reduce
stack[-1] = func(*args)
^^^^^^^^^^^File "/home/adminuser/venv/lib/python3.11/site-packages/scikeras/_saving_utils.py", line 49, in unpack_keras_model
model: keras.Model = load_model(temp_dir)
^^^^^^^^^^^^^^^^^^^^File "/home/adminuser/venv/lib/python3.11/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.11/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.11/site-packages/tensorflow/python/saved_model/load.py", line 991, in load_partial
raise FileNotFoundError(