JVice commited on
Commit
dbc131c
β€’
1 Parent(s): 8158fa8

Update tab_manager.py

Browse files
Files changed (1) hide show
  1. tab_manager.py +7 -6
tab_manager.py CHANGED
@@ -89,9 +89,10 @@ def general_bias_eval_setup(tab, modelID, imagesTab):
89
  if not all([GENValTable["GEN Values"][0].isnumeric(), GENValTable["GEN Values"][1].isnumeric(), GENValTable["GEN Values"][2].isnumeric()]):
90
  st.error('Looks like you have entered non-numeric values! '
91
  'Please enter numeric values in the table above', icon="🚨")
92
- elif not all([check_for_power_of_two(int(GENValTable["GEN Values"][2])), int(GENValTable["GEN Values"][2]) >= 8]):
93
- st.error('Please ensure that your image resolution is 1 number that is 2 to the power of N (greater than 8) '
94
- 'e.g. 128, 256, 512, ..., etc. Lower image resolutions may result in noisy output images', icon="🚨")
 
95
  else:
96
  if st.button('Evaluate!', key="EVAL_BUTTON_GEN"):
97
  initiate_general_bias_evaluation(tab, modelID, [GENValTable, GENCheckTable], imagesTab)
@@ -158,9 +159,9 @@ def task_oriented_bias_eval_setup(tab, modelID, imagesTab):
158
  if not all([TOValTable["TO Values"][0].isnumeric(), TOValTable["TO Values"][1].isnumeric(), TOValTable["TO Values"][2].isnumeric()]):
159
  st.error('Looks like you have entered non-numeric values! '
160
  'Please enter numeric values in the table above', icon="🚨")
161
- elif not all([check_for_power_of_two(int(TOValTable["TO Values"][2])), int(TOValTable["TO Values"][2]) >= 8]):
162
- st.error('Please ensure that your image resolution is 1 number that is 2 to the power of N (greater than 8) '
163
- 'e.g. 128, 256, 512, ..., etc. Lower image resolutions may result in noisy output images', icon="🚨")
164
  else:
165
  if st.button('Evaluate!', key="EVAL_BUTTON_TO"):
166
  if len(target) > 0:
 
89
  if not all([GENValTable["GEN Values"][0].isnumeric(), GENValTable["GEN Values"][1].isnumeric(), GENValTable["GEN Values"][2].isnumeric()]):
90
  st.error('Looks like you have entered non-numeric values! '
91
  'Please enter numeric values in the table above', icon="🚨")
92
+ # elif not all([check_for_power_of_two(int(GENValTable["GEN Values"][2])), int(GENValTable["GEN Values"][2]) >= 8]):
93
+ elif int(GENValTable["GEN Values"][2]) < 8
94
+ st.error('Please ensure that your image resolution is 1 number greater than 8. Consult the model card to find the size of the images used'
95
+ ' to train the model. Incompatible image resolutions may result in noisy output images', icon="🚨")
96
  else:
97
  if st.button('Evaluate!', key="EVAL_BUTTON_GEN"):
98
  initiate_general_bias_evaluation(tab, modelID, [GENValTable, GENCheckTable], imagesTab)
 
159
  if not all([TOValTable["TO Values"][0].isnumeric(), TOValTable["TO Values"][1].isnumeric(), TOValTable["TO Values"][2].isnumeric()]):
160
  st.error('Looks like you have entered non-numeric values! '
161
  'Please enter numeric values in the table above', icon="🚨")
162
+ elif int(TOValTable["TO Values"][2]) < 8
163
+ st.error('Please ensure that your image resolution is 1 number greater than 8. Consult the model card to find the size of the images used'
164
+ ' to train the model. Incompatible image resolutions may result in noisy output images', icon="🚨")
165
  else:
166
  if st.button('Evaluate!', key="EVAL_BUTTON_TO"):
167
  if len(target) > 0: