ludusc commited on
Commit
6e0b239
1 Parent(s): 7e9d843
pages/1_Textiles_Disentanglement.py CHANGED
@@ -80,7 +80,8 @@ with input_col_2:
80
  with st.form('text_form'):
81
 
82
  st.write('**Choose color to vary**')
83
- type_col = st.selectbox('Color:', tuple(COLORS_LIST), value=st.session_state.concepts_ids)
 
84
 
85
  st.write('**Set range of change**')
86
  chosen_color_lambda_input = st.empty()
@@ -139,10 +140,10 @@ with header_col_1:
139
  st.write(f'Original image')
140
 
141
  with header_col_2:
142
- color_separation_vector, performance_color = concept_vectors[concept_vectors['color'] == st.session_state.concepts_ids].loc[0, ['vector', 'score']]
143
  saturation_separation_vector, performance_saturation = concept_vectors[concept_vectors['color'] == 'Saturation'].loc[0, ['vector', 'score']]
144
  value_separation_vector, performance_value = concept_vectors[concept_vectors['color'] == 'Value'].loc[0, ['vector', 'score']]
145
- st.write(f'Change in {st.session_state.concepts_ids} of {np.round(color_lambda, 2)}, in saturation of {np.round(saturation_lambda, 2)}, in value of {np.round(value_lambda, 2)}. - Performance color vector: {performance_color}, saturation vector: {performance_saturation}, value vector: {performance_value}')
146
 
147
  # ---------------------------- DISPLAY COL 2 ROW 1 ------------------------------
148
 
 
80
  with st.form('text_form'):
81
 
82
  st.write('**Choose color to vary**')
83
+ type_col = st.selectbox('Color:', tuple(COLORS_LIST), value=st.session_state.concept_ids)
84
+ colors_button = st.form_submit_button('Choose the defined color')
85
 
86
  st.write('**Set range of change**')
87
  chosen_color_lambda_input = st.empty()
 
140
  st.write(f'Original image')
141
 
142
  with header_col_2:
143
+ color_separation_vector, performance_color = concept_vectors[concept_vectors['color'] == st.session_state.concept_ids].loc[0, ['vector', 'score']]
144
  saturation_separation_vector, performance_saturation = concept_vectors[concept_vectors['color'] == 'Saturation'].loc[0, ['vector', 'score']]
145
  value_separation_vector, performance_value = concept_vectors[concept_vectors['color'] == 'Value'].loc[0, ['vector', 'score']]
146
+ st.write(f'Change in {st.session_state.concept_ids} of {np.round(color_lambda, 2)}, in saturation of {np.round(saturation_lambda, 2)}, in value of {np.round(value_lambda, 2)}. - Performance color vector: {performance_color}, saturation vector: {performance_saturation}, value vector: {performance_value}')
147
 
148
  # ---------------------------- DISPLAY COL 2 ROW 1 ------------------------------
149