AhmedSSabir
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -176,9 +176,9 @@ def Visual_re_ranker(caption_G, caption_B, caption_VR, visual_context_label, vis
|
|
176 |
sim_3 = get_sim(sim_3)
|
177 |
|
178 |
|
179 |
-
LM_1 =
|
180 |
-
LM_2 =
|
181 |
-
LM_3 =
|
182 |
|
183 |
#LM = scorer.sentence_score(caption, reduce="mean")
|
184 |
score_1 = pow(float(LM_1),pow((1-float(sim_1))/(1+ float(sim_1)),1-float(visual_context_prob)))
|
|
|
176 |
sim_3 = get_sim(sim_3)
|
177 |
|
178 |
|
179 |
+
LM_1 = sentence_prob_mean(caption_G)
|
180 |
+
LM_2 = sentence_prob_mean(caption_B)
|
181 |
+
LM_3 = sentence_prob_mean(caption_VR)
|
182 |
|
183 |
#LM = scorer.sentence_score(caption, reduce="mean")
|
184 |
score_1 = pow(float(LM_1),pow((1-float(sim_1))/(1+ float(sim_1)),1-float(visual_context_prob)))
|