ClickableImages / app.py
awacke1's picture
Update app.py
74a6691
import streamlit as st
from st_clickable_images import clickable_images
clicked = clickable_images(
[
"https://images.unsplash.com/photo-1565130838609-c3a86655db61?w=700",
"https://images.unsplash.com/photo-1565372195458-9de0b320ef04?w=700",
"https://images.unsplash.com/photo-1582550945154-66ea8fff25e1?w=700",
"https://images.unsplash.com/photo-1591797442444-039f23ddcc14?w=700",
"https://images.unsplash.com/photo-1518727818782-ed5341dbd476?w=700",
],
titles=[f"Image #{str(i)}" for i in range(5)],
div_style={"display": "flex", "justify-content": "center", "flex-wrap": "wrap"},
img_style={"margin": "5px", "height": "200px"},
)
st.markdown(f"Image #{clicked} clicked" if clicked > -1 else "No image clicked")
from streamlit_pills import pills
selected = pills("Label", ["Option 1", "Option 2", "Option 3"], ["πŸ€", "🎈", "🌈"])
st.write(selected)
st.markdown("![Alt Text](https://media.giphy.com/media/og52So0BUmZVe/giphy.gif)")