import streamlit as st from PIL import Image import io x = st.slider('Select a value') st.write(x, 'square is ', x*x) uploaded_file = st.file_uploader('Enter an input sketch') if uploaded_file is None: st.write('No Input file found. Please contact administrator') bytes_data = uploaded_file.getvalue() img = Image.open(io.BytesIO(bytes_data)) st.image(img, caption='retrieved image')