Afsha001 commited on
Commit
b7ddb12
Β·
verified Β·
1 Parent(s): 8161819

update sidebar section

Browse files
Files changed (1) hide show
  1. app.py +12 -28
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
- # ── Live accuracy section β€” populated after pipeline runs ──────────────
455
- st.markdown("---")
456
- st.markdown("### Caption Quality")
457
-
458
- if "avg_score" in st.session_state:
459
- score = st.session_state.avg_score
460
- itm = st.session_state.itm_q
461
- cos = st.session_state.cosine_q
462
-
463
- if score >= 0.75:
464
- label, color = "Good", "#16a34a"
465
- elif score >= 0.50:
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