Hi, when I’m deploying my streamlit app, it shows me this error
2021-04-07 00:06:49.788 Uncaught app exception
Traceback (most recent call last):
File "/home/appuser/.local/lib/python3.7/site-packages/streamlit/script_runner.py", line 333, in _run_script
File "/app/covidclassificationpython/CovidClassification.py", line 14, in <module>
image = Image.open('C:/Users/pavit/Desktop/covid4.jpg')
File "/usr/local/lib/python3.7/site-packages/PIL/Image.py", line 2904, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/pavit/Desktop/covid4.jpg'
However, when I run the webapp in my localhost it shows me the image.
This is the way I’m loading the image. I tried changing the slashes to the backslashes, and I couldn’t run the app.
image = Image.open(‘C:/Users/pavit/Desktop/covid4.jpg’)
st.image(image, caption=‘ML’, use_column_width=True)
Can someone please help me?