Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -126,24 +126,23 @@ app_mode = st.sidebar.selectbox("Please select from the following", SIDEBAR_OPTI
|
|
126 |
photos = ["fight.jpg","shaolin-kung-fu.jpg"]
|
127 |
clr = [(185, 39, 40),(40, 96, 219),(249, 223, 2)]
|
128 |
colour = ["Red","Blue","Yellow"]
|
129 |
-
|
|
|
130 |
st.sidebar.write(" ------ ")
|
131 |
-
option = st.sidebar.selectbox('Please select a sample image, then click Magic Time button', photos)
|
132 |
option2 = st.sidebar.selectbox('Please select a sample image, then click Magic Time button', colour)
|
133 |
colour[0] = clr[0]
|
134 |
colour[1] = clr[1]
|
135 |
colour[2] = clr[2]
|
|
|
|
|
|
|
136 |
pressed = st.sidebar.button('PoP')
|
137 |
if pressed:
|
138 |
st.empty()
|
139 |
st.sidebar.write('Please wait for the magic to happen! This may take up to a minute.')
|
140 |
predict(option,option2)
|
141 |
|
142 |
-
elif app_mode == SIDEBAR_OPTION_UPLOAD_IMAGE
|
143 |
uploaded_file = st.file_uploader("Choose an image...")
|
144 |
-
option2 = st.sidebar.selectbox('Please select a sample image, then click Magic Time button', colour)
|
145 |
-
colour[0] = clr[0]
|
146 |
-
colour[1] = clr[1]
|
147 |
-
colour[2] = clr[2]
|
148 |
if uploaded_file is not None:
|
149 |
predict(uploaded_file,option2)
|
|
|
126 |
photos = ["fight.jpg","shaolin-kung-fu.jpg"]
|
127 |
clr = [(185, 39, 40),(40, 96, 219),(249, 223, 2)]
|
128 |
colour = ["Red","Blue","Yellow"]
|
129 |
+
|
130 |
+
if app_mode == SIDEBAR_OPTION_DEMO_IMAGE:
|
131 |
st.sidebar.write(" ------ ")
|
|
|
132 |
option2 = st.sidebar.selectbox('Please select a sample image, then click Magic Time button', colour)
|
133 |
colour[0] = clr[0]
|
134 |
colour[1] = clr[1]
|
135 |
colour[2] = clr[2]
|
136 |
+
if app_mode == SIDEBAR_OPTION_DEMO_IMAGE:
|
137 |
+
st.sidebar.write(" ------ ")
|
138 |
+
option = st.sidebar.selectbox('Please select a sample image, then click Magic Time button', photos)
|
139 |
pressed = st.sidebar.button('PoP')
|
140 |
if pressed:
|
141 |
st.empty()
|
142 |
st.sidebar.write('Please wait for the magic to happen! This may take up to a minute.')
|
143 |
predict(option,option2)
|
144 |
|
145 |
+
elif app_mode == SIDEBAR_OPTION_UPLOAD_IMAGE:
|
146 |
uploaded_file = st.file_uploader("Choose an image...")
|
|
|
|
|
|
|
|
|
147 |
if uploaded_file is not None:
|
148 |
predict(uploaded_file,option2)
|