Unable to upload image logo

Hi i got an error message as I’m trying to attach image logo as a header using this format(from PIL import Image

st.title(‘Total Data Science’)

image=Image.open( ‘tdslogo.png’)

Then i got this error
FileNotFoundError: [Errno 2] No such file or directory: ‘tdslogo.png’

Please i need help.
Thank you.

You could pass the path to the file directly to st.image:

image_path = 'tdslogo.png'
st.image(image_path, use_column_width=True)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.