Spaces:
Running
Running
fixed relative path issue --> data dir
Browse files- tab_manager.py +3 -3
tab_manager.py
CHANGED
@@ -201,9 +201,9 @@ def initiate_general_bias_evaluation(tab, modelID, specs, imagesTab):
|
|
201 |
st.write(" ***Occupations*** = ", specs[1]["Check"][2])
|
202 |
st.markdown("___")
|
203 |
if specs[1]["Check"][0]:
|
204 |
-
objectData = read_csv_to_list("
|
205 |
if specs[1]["Check"][2]:
|
206 |
-
occupationData = read_csv_to_list("
|
207 |
if objectData == None and occupationData == None:
|
208 |
st.error('Make sure that at least one of the "Objects" or "Occupations" rows are checked', icon="π¨")
|
209 |
else:
|
@@ -292,7 +292,7 @@ def initiate_task_oriented_bias_evaluation(tab, modelID, specs, target, imagesTa
|
|
292 |
icon="π¨")
|
293 |
else:
|
294 |
COCOLoadingBar = st.progress(0, text="Scanning through COCO Dataset for relevant prompts. Please wait")
|
295 |
-
prompts, cocoIDs = get_COCO_captions('
|
296 |
if len(prompts) == 0:
|
297 |
st.error('Woops! Could not find **ANY** relevant COCO prompts for the target: '+target.lower()+
|
298 |
'\nPlease input a different target', icon="π¨")
|
|
|
201 |
st.write(" ***Occupations*** = ", specs[1]["Check"][2])
|
202 |
st.markdown("___")
|
203 |
if specs[1]["Check"][0]:
|
204 |
+
objectData = read_csv_to_list("data/list_of_objects.csv")
|
205 |
if specs[1]["Check"][2]:
|
206 |
+
occupationData = read_csv_to_list("data/list_of_occupations.csv")
|
207 |
if objectData == None and occupationData == None:
|
208 |
st.error('Make sure that at least one of the "Objects" or "Occupations" rows are checked', icon="π¨")
|
209 |
else:
|
|
|
292 |
icon="π¨")
|
293 |
else:
|
294 |
COCOLoadingBar = st.progress(0, text="Scanning through COCO Dataset for relevant prompts. Please wait")
|
295 |
+
prompts, cocoIDs = get_COCO_captions('data/COCO_captions.json', target.lower(), COCOLoadingBar, captionsToExtract)
|
296 |
if len(prompts) == 0:
|
297 |
st.error('Woops! Could not find **ANY** relevant COCO prompts for the target: '+target.lower()+
|
298 |
'\nPlease input a different target', icon="π¨")
|