I am having trouble deploying my model into streamlit cloud. It works just fine on my local machine when run through command prompt but I get errors that it can’t find my model when trying to deploy the new app.
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
exec(code, module.__dict__)File "/mount/src/laptop-price-predict/streamlit_app.py", line 11, in <module>
model = load_model()File "/mount/src/laptop-price-predict/streamlit_app.py", line 8, in load_model
model = joblib.load(model_path)File "/home/adminuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 579, in load
with open(filename, 'rb') as f:
Here is my github that has the streamlit_app.py and my requirements.txt
Am I supposed to have something else in github to be able to run the app?
I’m sure its something that has to do with a path but I’m just not figuring it out.
This is my first time using GitHub so I’m sorry if I’m not following. Are you able to give me a step by step of what I’m supposed to do with the file? How and where it’s supposed to be so it can load properly?
I added the file but Im still getting the same error. ile “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 535, in _run_script
exec(code, module.dict)
File “/mount/src/laptop-price-predict/streamlit_app.py”, line 11, in
model = load_model()
File “/mount/src/laptop-price-predict/streamlit_app.py”, line 8, in load_model
model = joblib.load(model_path)
File “/home/adminuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py”, line 587, in load
obj = _unpickle(fobj, filename, mmap_mode)
File “/home/adminuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py”, line 506, in _unpickle
obj = unpickler.load()
File “/usr/local/lib/python3.9/pickle.py”, line 1212, in load
dispatchkey[0]