Create display.py
Browse files- display.py +14 -0
display.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
# Dropdown with image options
|
| 4 |
+
selected_image = st.selectbox('Select an image', ['Image 1', 'Image 2', 'Image 3'])
|
| 5 |
+
|
| 6 |
+
# Dictionary mapping image names to URLs
|
| 7 |
+
image_urls = {
|
| 8 |
+
'Image 1': 'https://via.placeholder.com/150',
|
| 9 |
+
'Image 2': 'https://via.placeholder.com/200',
|
| 10 |
+
'Image 3': 'https://via.placeholder.com/250'
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
# Display selected image
|
| 14 |
+
st.image(image_urls[selected_image], caption=selected_image)
|