rjiang12 commited on
Commit
57475f6
·
1 Parent(s): d3ccc20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -282,11 +282,11 @@ def bloombergViz(att, val, numblocks, score_templates_df, flip=False):
282
 
283
  res = ""
284
  print("score templates df", score_templates_df)
285
- for sentence in score_templates_df[score_templates_df['Attribute'] == att, score_templates_df['Stereotyped'] == 'yes', 'Template']:
286
  print("sentence", sentence)
287
- res += f"<div style='height:20px;width:20px;background-color:#555;display:inline-block' id='filled'><span class='tooltiptext' style='color:#FFF'>{sentence}</span></div> "
288
- for sentence in score_templates_df[score_templates_df['Attribute'] == att, score_templates_df['Stereotyped'] == 'no', 'Template']:
289
- res += f"<div style='height:20px;width:20px;background-color:#999;display:inline-block' id='empty'><span class='tooltiptext' style='color:#FFF'>{sentence}</span></div> "
290
  return res
291
  # if flip:
292
  # return numFilled * unfilled + numUnFilled * filled;
 
282
 
283
  res = ""
284
  print("score templates df", score_templates_df)
285
+ for sentence in score_templates_df.loc[score_templates_df['Attribute'] == att & score_templates_df['Stereotyped'] == 'yes']:
286
  print("sentence", sentence)
287
+ res += f"<div style='height:20px;width:20px;background-color:#555;display:inline-block' id='filled'><span class='tooltiptext' style='color:#FFF'>{sentence['Template']}</span></div> "
288
+ for sentence in score_templates_df.loc[score_templates_df['Attribute'] == att & score_templates_df['Stereotyped'] == 'no']:
289
+ res += f"<div style='height:20px;width:20px;background-color:#999;display:inline-block' id='empty'><span class='tooltiptext' style='color:#FFF'>{sentence['Template']}</span></div> "
290
  return res
291
  # if flip:
292
  # return numFilled * unfilled + numUnFilled * filled;