Zekun Wu commited on
Commit
c39065b
1 Parent(s): 8cb54c2
Files changed (1) hide show
  1. util/injection.py +2 -2
util/injection.py CHANGED
@@ -94,14 +94,14 @@ def process_scores_multiple(df, num_run, parameters, privilege_label, protect_la
94
  print(f"Scores: {scores}")
95
 
96
  for run in tqdm(range(num_run), desc="Processing runs", unit="run"):
97
- for index, row in tqdm(df.iterrows(), total=len(df), desc="Processing entries", unit="entry"):
98
  summary = []
99
  for column, value in row.items():
100
  if group_name.lower() not in column.lower():
101
  readable_name = ' '.join(word.capitalize() for word in column.split('_'))
102
  summary.append(f"{readable_name}: {value};")
103
 
104
- if additional_charateristics == True:
105
  charateristics = create_charateristics('\n'.join(summary), group_name, occupation, agent, parameters)
106
  else:
107
  charateristics = ""
 
94
  print(f"Scores: {scores}")
95
 
96
  for run in tqdm(range(num_run), desc="Processing runs", unit="run"):
97
+ for index, (idx, row) in tqdm(enumerate(df.iterrows()), total=len(df), desc="Processing entries", unit="entry"):
98
  summary = []
99
  for column, value in row.items():
100
  if group_name.lower() not in column.lower():
101
  readable_name = ' '.join(word.capitalize() for word in column.split('_'))
102
  summary.append(f"{readable_name}: {value};")
103
 
104
+ if additional_charateristics:
105
  charateristics = create_charateristics('\n'.join(summary), group_name, occupation, agent, parameters)
106
  else:
107
  charateristics = ""