How to create a slideshow of pictures on Streamlit and publish it on streamlit cloud

I am trying to create a slideshow of all my pictures and show it on streamlit app. below is the code and it does not work if I use a “for” loop. I am new to streamlit. can you please guide?
path = “C:/Users/user1/OneDrive/Documents/UK_TRIP”
filenames = glob.glob(os.path.join(path, “*”))
for filename in filenames:
print(filename)
image = Image.open(filename)
st.image(image, caption=‘Enter any caption here’)

Hi there,

Thanks for sharing your question with the community! Check out our guidelines on how to post an effective question here – in particular, please format your code properly so community members can reproduce the issue.

Caroline :balloon:

Hi,

Take a look at this app: Hybrid architecture media server, media service and Streamlit client app using FastAPI and Python

Arvindra

Thanks Caroline. Sure, will do for future posts.

Thank you for sharing the link. very interesting.