tekp / src /streamlit_app.py
Prabhav619's picture
Update src/streamlit_app.py
48a5f12 verified
raw
history blame contribute delete
581 Bytes
import streamlit as st
from PIL import Image
import io
st.title("Welcome to Streamlit!")
num_points = st.slider("Number of points in spiral", 1, 10000, 1100)
num_turns = st.slider("Number of turns in spiral", 1, 300, 31)
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
if uploaded_file:
# Convert the uploaded file to an image using PIL
try:
image = Image.open(uploaded_file)
st.image(image, caption="Uploaded Image", use_column_width=True)
except Exception as e:
st.error(f"Error displaying image: {e}")