File size: 393 Bytes
f0120b5
576c88e
 
f0120b5
 
 
576c88e
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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')