Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -296,7 +296,7 @@ def bloombergViz(att, val, numblocks, score_templates_df, flip=False):
|
|
296 |
|
297 |
def att_bloombergViz(att, val, numblocks, score_templates_df, flip=False):
|
298 |
viz = bloombergViz(att, val, numblocks, score_templates_df, flip)
|
299 |
-
attHTML = f"<
|
300 |
return attHTML
|
301 |
|
302 |
def startBiasTest(test_sentences_df, gr1, gr2, att1, att2, model_name, progress=gr.Progress()):
|
@@ -614,12 +614,10 @@ with gr.Blocks(theme=soft, title="Social Bias Testing in Language Models",
|
|
614 |
# show_label=False)
|
615 |
with gr.Row():
|
616 |
with gr.Column(variant="compact"):
|
617 |
-
|
618 |
-
gr.HTML(value="<center style='font-weight:600'>Attribute Group 1</center>")
|
619 |
attribute_bias_html_stereo = gr.HTML()
|
620 |
with gr.Column(variant="compact"):
|
621 |
-
|
622 |
-
gr.HTML(value="<center style='font-weight:600'>Attribute Group 2</center>")
|
623 |
attribute_bias_html_antistereo = gr.HTML()
|
624 |
|
625 |
# with gr.Row():
|
|
|
296 |
|
297 |
def att_bloombergViz(att, val, numblocks, score_templates_df, flip=False):
|
298 |
viz = bloombergViz(att, val, numblocks, score_templates_df, flip)
|
299 |
+
attHTML = f"<div style='border-style:solid;border-color:#999;border-radius:12px'>{att}: {round(val*100)}%<br>{viz}</div><br>"
|
300 |
return attHTML
|
301 |
|
302 |
def startBiasTest(test_sentences_df, gr1, gr2, att1, att2, model_name, progress=gr.Progress()):
|
|
|
614 |
# show_label=False)
|
615 |
with gr.Row():
|
616 |
with gr.Column(variant="compact"):
|
617 |
+
gr.Markdown("#### Attribute Group 1")
|
|
|
618 |
attribute_bias_html_stereo = gr.HTML()
|
619 |
with gr.Column(variant="compact"):
|
620 |
+
gr.Markdown("#### Attribute Group 2")
|
|
|
621 |
attribute_bias_html_antistereo = gr.HTML()
|
622 |
|
623 |
# with gr.Row():
|