Vijish commited on
Commit
006d371
1 Parent(s): 8792b08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -129,9 +129,11 @@ if app_mode == SIDEBAR_OPTION_DEMO_IMAGE:
129
  st.sidebar.write(" ------ ")
130
  option = st.sidebar.selectbox('Please select a sample image, then click Magic Time button', photos)
131
  colour = st.sidebar.selectbox("Colour", colour)
132
- colour[0] = (185, 39, 40)
133
- colour[1] = (40, 96, 219)
134
- colour[2] = (249, 223, 2)
 
 
135
  pressed = st.sidebar.button('PoP')
136
  if pressed:
137
  st.empty()
@@ -142,7 +144,9 @@ elif app_mode == SIDEBAR_OPTION_UPLOAD_IMAGE:
142
  uploaded_file = st.file_uploader("Choose an image...")
143
  if uploaded_file is not None:
144
  colour = st.sidebar.selectbox("Colour", colour)
145
- colour[0] = (185, 39, 40)
146
- colour[1] = (40, 96, 219)
147
- colour[2] = (249, 223, 2)
 
 
148
  predict(uploaded_file,colour)
 
129
  st.sidebar.write(" ------ ")
130
  option = st.sidebar.selectbox('Please select a sample image, then click Magic Time button', photos)
131
  colour = st.sidebar.selectbox("Colour", colour)
132
+ if colour == 'Red':
133
+ colour = (185, 39, 40)
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()
 
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)