Spaces:
Running
Running
update sidebar section
Browse files
app.py
CHANGED
|
@@ -451,34 +451,18 @@ Caption fusion
|
|
| 451 |
st.markdown("**Local:** Florence-2, BLIP ITM, Qwen2.5")
|
| 452 |
st.markdown("**API:** Jina")
|
| 453 |
|
| 454 |
-
# ββ
|
| 455 |
-
|
| 456 |
-
st.markdown("### Caption Quality")
|
| 457 |
-
|
| 458 |
-
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
label, color = "Moderate", "#d97706"
|
| 467 |
-
elif score >= 0.25:
|
| 468 |
-
label, color = "Low", "#ca8a04"
|
| 469 |
-
else:
|
| 470 |
-
label, color = "Poor", "#dc2626"
|
| 471 |
-
|
| 472 |
-
st.markdown(
|
| 473 |
-
f"<span style='background:{color};color:white;padding:3px 10px;"
|
| 474 |
-
f"border-radius:10px;font-weight:700;font-size:13px;'>{label}</span>",
|
| 475 |
-
unsafe_allow_html=True
|
| 476 |
-
)
|
| 477 |
-
st.markdown(f"**Overall:** {score} / 1.00")
|
| 478 |
-
st.markdown(f"BLIP ITM: **{itm}**")
|
| 479 |
-
st.markdown(f"Cosine Similarity: **{cos}**")
|
| 480 |
-
else:
|
| 481 |
-
st.caption("Run the pipeline to see scores.")
|
| 482 |
|
| 483 |
# ============================================================================
|
| 484 |
# MAIN UI
|
|
|
|
| 451 |
st.markdown("**Local:** Florence-2, BLIP ITM, Qwen2.5")
|
| 452 |
st.markdown("**API:** Jina")
|
| 453 |
|
| 454 |
+
# ββ accuracy section ββββββββββββββ
|
| 455 |
+
st.markdown("---")
|
| 456 |
+
st.markdown("### Caption Quality Metrics")
|
| 457 |
+
st.markdown("""
|
| 458 |
+
**BLIP ITM** (Image-Text Match)
|
| 459 |
+
Measures how well the caption
|
| 460 |
+
matches the image content.
|
| 461 |
+
|
| 462 |
+
**Cosine Similarity**
|
| 463 |
+
Measures embedding distance
|
| 464 |
+
between image and caption.
|
| 465 |
+
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 466 |
|
| 467 |
# ============================================================================
|
| 468 |
# MAIN UI
|