ludusc commited on
Commit
895260d
1 Parent(s): ae2da92

changed default

Browse files
Files changed (1) hide show
  1. pages/1_Textiles_Disentanglement.py +18 -15
pages/1_Textiles_Disentanglement.py CHANGED
@@ -49,7 +49,7 @@ with dnnlib.util.open_url('./data/textile_model_files/network-snapshot-005000.pk
49
  COLORS_LIST = ['Gray', 'Red Orange', 'Yellow', 'Green', 'Light Blue', 'Blue', 'Purple', 'Pink']
50
 
51
  if 'image_id' not in st.session_state:
52
- st.session_state.image_id = 0
53
  if 'color_ids' not in st.session_state:
54
  st.session_state.concept_ids = COLORS_LIST[-1]
55
  if 'space_id' not in st.session_state:
@@ -139,27 +139,30 @@ with input_col_4:
139
  with st.form('text_form_2'):
140
  st.write('Use best options')
141
  best = st.selectbox('Option:', tuple([True, False]), index=0)
142
- st.write('Options for StyleSpace (not available for Saturation and Value)')
143
- sign = st.selectbox('Sign option:', tuple([True, False]), index=1)
144
- num_factors = st.selectbox('Number of factors option:', tuple([1, 5, 10, 20, False]), index=4)
145
- st.write('Options for InterFaceGAN (not available for Saturation and Value)')
146
- cl_method = st.selectbox('Classification method option:', tuple(['LR', 'SVM', False]), index=2)
147
- regularization = st.selectbox('Regularization option:', tuple([0.1, 1.0, False]), index=2)
148
- st.write('Options for InterFaceGAN (only for Saturation and Value)')
149
- extremes = st.selectbox('Extremes option:', tuple([True, False]), index=1)
150
-
 
151
  choose_options_button = st.form_submit_button('Choose the defined options')
152
  # st.write('**Choose a latent space to disentangle**')
153
  # # chosen_text_id_input = st.empty()
154
  # # concept_id = chosen_text_id_input.text_input('Concept:', value=st.session_state.concept_id)
155
  # space_id = st.selectbox('Space:', tuple(['Z', 'W']))
156
  if choose_options_button:
157
- st.session_state.sign = sign
158
- st.session_state.num_factors = num_factors
159
- st.session_state.cl_method = cl_method
160
- st.session_state.regularization = regularization
161
- st.session_state.extremes = extremes
162
  st.session_state.best = best
 
 
 
 
 
 
 
163
 
164
  # with input_col_4:
165
  # with st.form('Network specifics:'):
 
49
  COLORS_LIST = ['Gray', 'Red Orange', 'Yellow', 'Green', 'Light Blue', 'Blue', 'Purple', 'Pink']
50
 
51
  if 'image_id' not in st.session_state:
52
+ st.session_state.image_id = 52921
53
  if 'color_ids' not in st.session_state:
54
  st.session_state.concept_ids = COLORS_LIST[-1]
55
  if 'space_id' not in st.session_state:
 
139
  with st.form('text_form_2'):
140
  st.write('Use best options')
141
  best = st.selectbox('Option:', tuple([True, False]), index=0)
142
+ if st.session_state.best is False:
143
+ st.write('Options for StyleSpace (not available for Saturation and Value)')
144
+ sign = st.selectbox('Sign option:', tuple([True, False]), index=1)
145
+ num_factors = st.selectbox('Number of factors option:', tuple([1, 5, 10, 20, False]), index=4)
146
+ st.write('Options for InterFaceGAN (not available for Saturation and Value)')
147
+ cl_method = st.selectbox('Classification method option:', tuple(['LR', 'SVM', False]), index=2)
148
+ regularization = st.selectbox('Regularization option:', tuple([0.1, 1.0, False]), index=2)
149
+ st.write('Options for InterFaceGAN (only for Saturation and Value)')
150
+ extremes = st.selectbox('Extremes option:', tuple([True, False]), index=1)
151
+
152
  choose_options_button = st.form_submit_button('Choose the defined options')
153
  # st.write('**Choose a latent space to disentangle**')
154
  # # chosen_text_id_input = st.empty()
155
  # # concept_id = chosen_text_id_input.text_input('Concept:', value=st.session_state.concept_id)
156
  # space_id = st.selectbox('Space:', tuple(['Z', 'W']))
157
  if choose_options_button:
 
 
 
 
 
158
  st.session_state.best = best
159
+ if st.session_state.best is False:
160
+ st.session_state.sign = sign
161
+ st.session_state.num_factors = num_factors
162
+ st.session_state.cl_method = cl_method
163
+ st.session_state.regularization = regularization
164
+ st.session_state.extremes = extremes
165
+
166
 
167
  # with input_col_4:
168
  # with st.form('Network specifics:'):