Spaces:
Sleeping
Sleeping
AhmedSSabir
commited on
Commit
•
959c369
1
Parent(s):
2b94d4c
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ import requests
|
|
14 |
|
15 |
from sentence_transformers import SentenceTransformer, util
|
16 |
|
17 |
-
|
18 |
-
model_sts = SentenceTransformer('roberta-large-nli-stsb-mean-tokens')
|
19 |
#batch_size = 1
|
20 |
#scorer = LMScorer.from_pretrained('gpt2' , device=device, batch_size=batch_size)
|
21 |
|
@@ -136,8 +136,8 @@ def Visual_re_ranker(caption_man, caption_woman, context_label, context_prob):
|
|
136 |
demo = gr.Interface(
|
137 |
fn=Visual_re_ranker,
|
138 |
description="Demo for Women Wearing Lipstick: Measuring the Bias Between Object and Its Related Gender",
|
139 |
-
|
140 |
-
|
141 |
|
142 |
|
143 |
outputs="label",
|
|
|
14 |
|
15 |
from sentence_transformers import SentenceTransformer, util
|
16 |
|
17 |
+
model_sts = SentenceTransformer('stsb-distilbert-base')
|
18 |
+
# model_sts = SentenceTransformer('roberta-large-nli-stsb-mean-tokens')
|
19 |
#batch_size = 1
|
20 |
#scorer = LMScorer.from_pretrained('gpt2' , device=device, batch_size=batch_size)
|
21 |
|
|
|
136 |
demo = gr.Interface(
|
137 |
fn=Visual_re_ranker,
|
138 |
description="Demo for Women Wearing Lipstick: Measuring the Bias Between Object and Its Related Gender",
|
139 |
+
inputs=[gr.Textbox(value="a man riding a motorcycle on a road") , gr.Textbox(value="a woman riding a motorcycle on a road"), gr.Textbox(value="motor scooter"), gr.Textbox(value="0.2183")],
|
140 |
+
|
141 |
|
142 |
|
143 |
outputs="label",
|