JVice commited on
Commit
d883055
β€’
1 Parent(s): fcedab0

fixed relative path issue --> data dir

Browse files
Files changed (1) hide show
  1. 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("./list_of_objects.csv")
205
  if specs[1]["Check"][2]:
206
- occupationData = read_csv_to_list("./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,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('./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="🚨")
 
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="🚨")