Commit
·
3e97a0d
1
Parent(s):
5b61e93
Update app.py
Browse files
app.py
CHANGED
@@ -162,7 +162,7 @@ def Visual_re_ranker(sentence_man, sentence_woman, context_label, context_prob):
|
|
162 |
context_prob = context_prob
|
163 |
sentence_emb_man = model_sbert.encode(sentence_man, convert_to_tensor=True)
|
164 |
sentence_emb_woman = model_sbert.encode(sentence_woman, convert_to_tensor=True)
|
165 |
-
|
166 |
|
167 |
sim_m = cosine_scores = util.pytorch_cos_sim(sentence_emb_man, context_label_emb)
|
168 |
sim_m = sim_m.cpu().numpy()
|
|
|
162 |
context_prob = context_prob
|
163 |
sentence_emb_man = model_sbert.encode(sentence_man, convert_to_tensor=True)
|
164 |
sentence_emb_woman = model_sbert.encode(sentence_woman, convert_to_tensor=True)
|
165 |
+
context_label_emb = model_sbert.encode(context_label, convert_to_tensor=True)
|
166 |
|
167 |
sim_m = cosine_scores = util.pytorch_cos_sim(sentence_emb_man, context_label_emb)
|
168 |
sim_m = sim_m.cpu().numpy()
|