Open() function while deploying streamlit app

295 Views Asked by At

I get an error of no such file or directory while am deploying a streamlit app to streamlit cloud share, what could be the problem, i have all files in the same directory and as a standalone the app works perfectly the error comes only when am deploying the app, i need help

Loaded_model = pickle.load(open(filepath here/savfile)

1

There are 1 best solutions below

0
On

The files in a Streamlit app are stored in a folder called app – as a result, you'll usually need to adjust the file paths when you're deploying an app that you were previously running locally. I'd recommend doing os.getcwd() to return the file path and confirm that your file paths are correct.