Hello, everyone!
I’ve tried deploying an app using Streamlit Community Cloud but for some reason all the images are not showing. I tried moving all the files from a subfolder to the same folder level as the main page of my app but I have a 'file not found error ’ each time:
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.__dict__)File "/mount/src/online_courses-project/Streamlit_app/Home.py", line 21, in <module>
image_1=Image.open('online_education.jpg')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/home/adminuser/venv/lib/python3.11/site-packages/PIL/Image.py", line 3277, in open
fp = builtins.open(filename, "rb")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To display images I used this type of code:
from PIL import Image
image_1=Image.open('online_education.jpg')
st.image(image_1)
I also tried to simply use st.image(‘file_path’) but it didn’t work. I don’t understand what I did wrong because everything works perfectly well locally…
here’s the streamlit link:
app_link
and my github streamlit_repo
It’s my first time deploying an app so I’ll appreciate any help/insights you might have!