streamlit / display.py
jkushwaha's picture
Create display.py
773dee2 verified
import streamlit as st
# Dropdown with image options
selected_image = st.selectbox('Select an image', ['Image 1', 'Image 2', 'Image 3'])
# Dictionary mapping image names to URLs
image_urls = {
'Image 1': 'https://via.placeholder.com/150',
'Image 2': 'https://via.placeholder.com/200',
'Image 3': 'https://via.placeholder.com/250'
}
# Display selected image
st.image(image_urls[selected_image], caption=selected_image)