Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#####
|
| 2 |
+
###
|
| 3 |
+
# Imports
|
| 4 |
+
###
|
| 5 |
+
#####
|
| 6 |
import streamlit as st
|
| 7 |
|
| 8 |
+
#####
|
| 9 |
+
###
|
| 10 |
+
# Setup
|
| 11 |
+
###
|
| 12 |
+
#####
|
| 13 |
+
st.set_page_config(layout="wide")
|
| 14 |
+
|
| 15 |
+
if 'image' not in st.session_state:
|
| 16 |
+
st.session_state.image = None
|
| 17 |
+
|
| 18 |
+
#####
|
| 19 |
+
###
|
| 20 |
+
# Upload
|
| 21 |
+
###
|
| 22 |
+
#####
|
| 23 |
+
st.write("# Where's Waldo and Friends")
|
| 24 |
+
st.write("Instructions")
|
| 25 |
+
|
| 26 |
+
st.session_state.image = st.file_uploader(label="Upload a JPEG photo",
|
| 27 |
+
type=['jpg'],
|
| 28 |
+
accept_multiple_files=False,
|
| 29 |
+
key=None,
|
| 30 |
+
help='Due to image resolution limitations of the tool, only photos of a single page are expected to produce the intended result',
|
| 31 |
+
on_change=None,
|
| 32 |
+
args=None,
|
| 33 |
+
kwargs=None,
|
| 34 |
+
disabled=False,
|
| 35 |
+
label_visibility="visible"
|
| 36 |
+
)
|
| 37 |
+
|
| 38 |
+
#####
|
| 39 |
+
###
|
| 40 |
+
# Output and Interaction
|
| 41 |
+
###
|
| 42 |
+
#####
|
| 43 |
+
_, col_1, col_2, _ = st.columns(4, gap="medium")
|
| 44 |
+
with column_2:
|
| 45 |
+
st.image(st.session_state.image)
|