Vijish commited on
Commit
296bc2d
1 Parent(s): eddc711

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -121,19 +121,18 @@ SIDEBAR_OPTION_COLOUR_IMAGE = "Choose a colour"
121
 
122
  SIDEBAR_OPTIONS = [SIDEBAR_OPTION_DEMO_IMAGE, SIDEBAR_OPTION_UPLOAD_IMAGE,SIDEBAR_OPTION_COLOUR_IMAGE]
123
 
124
- clr = [(185, 39, 40),(40, 96, 219),(249, 223, 2)]
125
- colour = ["Red","Blue","Yellow"]
126
- option2 = st.sidebar.selectbox('Please select a sample image, then click Magic Time button', colour)
127
- colour[0] = clr[0]
128
- colour[1] = clr[1]
129
- colour[2] = clr[2]
130
 
131
  app_mode = st.sidebar.selectbox("Please select from the following", SIDEBAR_OPTIONS)
132
  photos = ["fight.jpg","shaolin-kung-fu.jpg"]
133
-
 
134
  if app_mode == SIDEBAR_OPTION_DEMO_IMAGE and app_mode == SIDEBAR_OPTION_COLOUR_IMAGE:
135
  st.sidebar.write(" ------ ")
136
  option = st.sidebar.selectbox('Please select a sample image, then click Magic Time button', photos)
 
 
 
 
137
  pressed = st.sidebar.button('PoP')
138
  if pressed:
139
  st.empty()
@@ -141,9 +140,10 @@ if app_mode == SIDEBAR_OPTION_DEMO_IMAGE and app_mode == SIDEBAR_OPTION_COLOUR_I
141
  predict(option,option2)
142
 
143
  elif app_mode == SIDEBAR_OPTION_UPLOAD_IMAGE and app_mode == SIDEBAR_OPTION_COLOUR_IMAGE:
 
 
144
  colour[0] = clr[0]
145
  colour[1] = clr[1]
146
  colour[2] = clr[2]
147
- uploaded_file = st.file_uploader("Choose an image...")
148
  if uploaded_file is not None:
149
  predict(uploaded_file,option2)
 
121
 
122
  SIDEBAR_OPTIONS = [SIDEBAR_OPTION_DEMO_IMAGE, SIDEBAR_OPTION_UPLOAD_IMAGE,SIDEBAR_OPTION_COLOUR_IMAGE]
123
 
 
 
 
 
 
 
124
 
125
  app_mode = st.sidebar.selectbox("Please select from the following", SIDEBAR_OPTIONS)
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
  if app_mode == SIDEBAR_OPTION_DEMO_IMAGE and app_mode == SIDEBAR_OPTION_COLOUR_IMAGE:
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()
 
140
  predict(option,option2)
141
 
142
  elif app_mode == SIDEBAR_OPTION_UPLOAD_IMAGE and app_mode == SIDEBAR_OPTION_COLOUR_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)