pinakinathc commited on
Commit
576c88e
1 Parent(s): f0120b5
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -1,4 +1,16 @@
1
  import streamlit as st
 
 
2
 
3
  x = st.slider('Select a value')
4
  st.write(x, 'square is ', x*x)
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ from PIL import Image
3
+ import io
4
 
5
  x = st.slider('Select a value')
6
  st.write(x, 'square is ', x*x)
7
+
8
+ uploaded_file = st.file_uploader('Enter an input sketch')
9
+
10
+ if uploaded_file is None:
11
+ st.write('No Input file found. Please contact administrator')
12
+
13
+ bytes_data = uploaded_file.getvalue()
14
+ img = Image.open(io.BytesIO(bytes_data))
15
+
16
+ st.image(img, caption='retrieved image')