Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -181,8 +181,6 @@ def evaluate_caption(image, caption1, caption2, unique_refined_labels):
|
|
| 181 |
#Define similarity threshold
|
| 182 |
similarity_score = compute_similarity(caption1, caption2)
|
| 183 |
|
| 184 |
-
print(similarity_score)
|
| 185 |
-
|
| 186 |
similarity_threshold = 0.9 # Replace this with whatever you consider "close enough"
|
| 187 |
|
| 188 |
score_difference = abs(score_caption1 - score_caption2)
|
|
@@ -230,7 +228,7 @@ img_cap_ui = gr.Interface(
|
|
| 230 |
outputs=[gr.Textbox(label="Caption from the git-coco model"),
|
| 231 |
gr.Textbox(label="Caption from the nlp-connect model"),
|
| 232 |
gr.Textbox(label="Suggested caption after automatic evaluation")],
|
| 233 |
-
article="The caption evaluation method use a simple voting scheme from outputs
|
| 234 |
theme=gr.themes.Soft()
|
| 235 |
)
|
| 236 |
|
|
|
|
| 181 |
#Define similarity threshold
|
| 182 |
similarity_score = compute_similarity(caption1, caption2)
|
| 183 |
|
|
|
|
|
|
|
| 184 |
similarity_threshold = 0.9 # Replace this with whatever you consider "close enough"
|
| 185 |
|
| 186 |
score_difference = abs(score_caption1 - score_caption2)
|
|
|
|
| 228 |
outputs=[gr.Textbox(label="Caption from the git-coco model"),
|
| 229 |
gr.Textbox(label="Caption from the nlp-connect model"),
|
| 230 |
gr.Textbox(label="Suggested caption after automatic evaluation")],
|
| 231 |
+
article="The caption evaluation method use a simple voting scheme from outputs of 2 additional models. This is an expirement, please use your judgment/edit if you use the generated caption.",
|
| 232 |
theme=gr.themes.Soft()
|
| 233 |
)
|
| 234 |
|