I hosted a webpage on streamlit cloud. However, it is giving an error. It can’t find the image and pictures.
Hi @Data_Tashi, welcome to the community!
The path to all the images the images need to be updated in your Image.open()
commands. Currently, the path contains D:/DHI_GIC/pic/
as a prefix. That prefix is specific to your local machine.
On Streamlit Cloud, as your images are in the root of your GitHub repo, you can remove the D:/DHI_GIC/pic/
prefix and pass just the image filenames to Image.open()
.
For example, Image.open("D:/DHI_GIC/pic/excel.jpg")
would become:
Image.open("excel.jpg")
Happy Streamlit-ing!
Snehan
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.