Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -134,19 +134,19 @@ if app_mode == SIDEBAR_OPTION_DEMO_IMAGE:
|
|
134 |
#colour[0] = (185, 39, 40)
|
135 |
#colour[1] = (40, 96, 219)
|
136 |
#colour[2] = (249, 223, 2)
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
|
143 |
elif app_mode == SIDEBAR_OPTION_UPLOAD_IMAGE:
|
144 |
uploaded_file = st.file_uploader("Choose an image...")
|
145 |
if uploaded_file is not None:
|
146 |
colour = st.sidebar.selectbox("Colour", colour)
|
147 |
if colour == 'Red':
|
148 |
-
|
149 |
#colour[0] = (185, 39, 40)
|
150 |
#colour[1] = (40, 96, 219)
|
151 |
#colour[2] = (249, 223, 2)
|
152 |
-
|
|
|
134 |
#colour[0] = (185, 39, 40)
|
135 |
#colour[1] = (40, 96, 219)
|
136 |
#colour[2] = (249, 223, 2)
|
137 |
+
pressed = st.sidebar.button('PoP')
|
138 |
+
if pressed:
|
139 |
+
st.empty()
|
140 |
+
st.sidebar.write('Please wait for the magic to happen! This may take up to a minute.')
|
141 |
+
predict(option,colour)
|
142 |
|
143 |
elif app_mode == SIDEBAR_OPTION_UPLOAD_IMAGE:
|
144 |
uploaded_file = st.file_uploader("Choose an image...")
|
145 |
if uploaded_file is not None:
|
146 |
colour = st.sidebar.selectbox("Colour", colour)
|
147 |
if colour == 'Red':
|
148 |
+
colour = (185, 39, 40)
|
149 |
#colour[0] = (185, 39, 40)
|
150 |
#colour[1] = (40, 96, 219)
|
151 |
#colour[2] = (249, 223, 2)
|
152 |
+
predict(uploaded_file,colour)
|