Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -283,10 +283,12 @@ def bloombergViz(att, val, numblocks, score_templates_df, flip=False):
|
|
283 |
res = ""
|
284 |
dfy = score_templates_df.loc[(score_templates_df['Attribute'] == att) & (score_templates_df['Stereotyped'] == 'yes')]
|
285 |
dfn = score_templates_df.loc[(score_templates_df['Attribute'] == att) & (score_templates_df['Stereotyped'] == 'no')]
|
|
|
|
|
286 |
for i in range(len(dfy.index)):
|
287 |
res += f"<div style='height:20px;width:20px;background-color:#555;display:inline-block' id='filled'><span class='tooltiptext' style='color:#FFF'>{dfy.iloc[i, 3]}</span></div> "
|
288 |
for i in range(len(dfn.index)):
|
289 |
-
res += f"<div style='height:20px;width:20px;background-color:#999;display:inline-block' id='empty'><span class='tooltiptext' style='color:#FFF'>{
|
290 |
return res
|
291 |
# if flip:
|
292 |
# return numFilled * unfilled + numUnFilled * filled;
|
|
|
283 |
res = ""
|
284 |
dfy = score_templates_df.loc[(score_templates_df['Attribute'] == att) & (score_templates_df['Stereotyped'] == 'yes')]
|
285 |
dfn = score_templates_df.loc[(score_templates_df['Attribute'] == att) & (score_templates_df['Stereotyped'] == 'no')]
|
286 |
+
print("dfy", dfy)
|
287 |
+
print("dfn", dfn)
|
288 |
for i in range(len(dfy.index)):
|
289 |
res += f"<div style='height:20px;width:20px;background-color:#555;display:inline-block' id='filled'><span class='tooltiptext' style='color:#FFF'>{dfy.iloc[i, 3]}</span></div> "
|
290 |
for i in range(len(dfn.index)):
|
291 |
+
res += f"<div style='height:20px;width:20px;background-color:#999;display:inline-block' id='empty'><span class='tooltiptext' style='color:#FFF'>{dfn.iloc[i, 3]}</span></div> "
|
292 |
return res
|
293 |
# if flip:
|
294 |
# return numFilled * unfilled + numUnFilled * filled;
|