Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from st_clickable_images import clickable_images
|
3 |
+
|
4 |
+
clicked = clickable_images(
|
5 |
+
[
|
6 |
+
"https://images.unsplash.com/photo-1565130838609-c3a86655db61?w=700",
|
7 |
+
"https://images.unsplash.com/photo-1565372195458-9de0b320ef04?w=700",
|
8 |
+
"https://images.unsplash.com/photo-1582550945154-66ea8fff25e1?w=700",
|
9 |
+
"https://images.unsplash.com/photo-1591797442444-039f23ddcc14?w=700",
|
10 |
+
"https://images.unsplash.com/photo-1518727818782-ed5341dbd476?w=700",
|
11 |
+
],
|
12 |
+
titles=[f"Image #{str(i)}" for i in range(5)],
|
13 |
+
div_style={"display": "flex", "justify-content": "center", "flex-wrap": "wrap"},
|
14 |
+
img_style={"margin": "5px", "height": "200px"},
|
15 |
+
)
|
16 |
+
|
17 |
+
st.markdown(f"Image #{clicked} clicked" if clicked > -1 else "No image clicked")
|