Spaces:
Runtime error
Runtime error
Commit
·
9379b48
1
Parent(s):
007a7f8
Updated app.py
Browse files
app.py
CHANGED
@@ -40,18 +40,31 @@ def upload():
|
|
40 |
|
41 |
def main(options):
|
42 |
col1,col2=st.columns(2)
|
|
|
|
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
|
47 |
with col1:
|
48 |
-
if
|
49 |
-
|
50 |
-
original_image=0
|
51 |
with col1:
|
52 |
image, original_image= upload()
|
53 |
-
if original_image is not None and original_image is not None and
|
|
|
|
|
54 |
pass
|
|
|
|
|
55 |
with col2:
|
56 |
st.warning('Wait for few seconds!!')
|
57 |
progress_bar = st.progress(0.0)
|
|
|
40 |
|
41 |
def main(options):
|
42 |
col1,col2=st.columns(2)
|
43 |
+
image=None
|
44 |
+
original_image=None
|
45 |
|
46 |
+
if 'c01' not in st.session_state:
|
47 |
+
st.session_state.c01=False
|
48 |
+
c01_state=st.session_state.c01
|
49 |
+
c01_state=st.sidebar.checkbox('Take a picture for prediction',value=c01_state)
|
50 |
+
|
51 |
+
if 'c02' not in st.session_state:
|
52 |
+
st.session_state.c02=False
|
53 |
+
c02_state=st.session_state.c02
|
54 |
+
c02_state=st.sidebar.checkbox('Detect',value=c02_state)
|
55 |
|
56 |
|
57 |
with col1:
|
58 |
+
if c01_state:
|
59 |
+
|
|
|
60 |
with col1:
|
61 |
image, original_image= upload()
|
62 |
+
if original_image is not None and original_image is not None and c02_state:
|
63 |
+
|
64 |
+
# Check if original_image is not None
|
65 |
pass
|
66 |
+
st.session_state.c02=c02_state
|
67 |
+
st.session_state.c01=c01_state
|
68 |
with col2:
|
69 |
st.warning('Wait for few seconds!!')
|
70 |
progress_bar = st.progress(0.0)
|