Commit
·
29f039b
1
Parent(s):
c54d151
Update app.py
Browse files
app.py
CHANGED
@@ -150,7 +150,6 @@ def get_sim(x):
|
|
150 |
x = str(x)[1:-1]
|
151 |
return x
|
152 |
|
153 |
-
|
154 |
|
155 |
|
156 |
|
@@ -182,7 +181,7 @@ def Visual_re_ranker(sentence_man, sentence_woman, context_label, context_prob):
|
|
182 |
|
183 |
|
184 |
|
185 |
-
return {"彼 (man)": float(score_man)
|
186 |
|
187 |
|
188 |
|
@@ -192,7 +191,7 @@ def Visual_re_ranker(sentence_man, sentence_woman, context_label, context_prob):
|
|
192 |
demo = gr.Interface(
|
193 |
fn=Visual_re_ranker,
|
194 |
description="Demo for Women Wearing Lipstick: Measuring the Bias Between Object and Its Related Gender",
|
195 |
-
inputs=[gr.Textbox(value="ハイデルベルク大学は彼の出身大学である。") , gr.Textbox(value="
|
196 |
#inputs=[gr.Textbox(value="a man is blow drying his hair in the bathroom") , gr.Textbox(value="a woman is blow drying her hair in the bathroom"), gr.Textbox(value="hair spray"), gr.Textbox(value="0.7385")],
|
197 |
#outputs=[gr.Textbox(value="Language Model Score") , gr.Textbox(value="Semantic Similarity Score"), gr.Textbox(value="Belief revision score via visual context")],
|
198 |
outputs="label",
|
|
|
150 |
x = str(x)[1:-1]
|
151 |
return x
|
152 |
|
|
|
153 |
|
154 |
|
155 |
|
|
|
181 |
|
182 |
|
183 |
|
184 |
+
return {"彼 (man)": float(score_man), "彼女 (woman)": float(score_woman)}
|
185 |
|
186 |
|
187 |
|
|
|
191 |
demo = gr.Interface(
|
192 |
fn=Visual_re_ranker,
|
193 |
description="Demo for Women Wearing Lipstick: Measuring the Bias Between Object and Its Related Gender",
|
194 |
+
inputs=[gr.Textbox(value="ハイデルベルク大学は彼の出身大学である。") , gr.Textbox(value="ハイデルベルク大学は彼女の出身大学である。"), gr.Textbox(value="大学"), gr.Textbox(value="0.7458009")],
|
195 |
#inputs=[gr.Textbox(value="a man is blow drying his hair in the bathroom") , gr.Textbox(value="a woman is blow drying her hair in the bathroom"), gr.Textbox(value="hair spray"), gr.Textbox(value="0.7385")],
|
196 |
#outputs=[gr.Textbox(value="Language Model Score") , gr.Textbox(value="Semantic Similarity Score"), gr.Textbox(value="Belief revision score via visual context")],
|
197 |
outputs="label",
|