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]
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.