Spaces:
Sleeping
Sleeping
Update tab_manager.py
Browse files- 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 |
-
|
94 |
-
|
|
|
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
|
162 |
-
st.error('Please ensure that your image resolution is 1 number
|
163 |
-
'
|
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:
|