import streamlit as st from PIL import Image import io x = st.slider('Select a value') st.write(x, 'squared is', x * x) st.title("Image Upload and Processing App") # Upload the image uploaded_image = st.file_uploader("Upload an Image", type=["jpg", "png", "jpeg"]) # Process and display if image is uploaded if uploaded_image is not None: image = Image.open(uploaded_image) st.image(image, caption="Uploaded Image", use_column_width=True)