Spaces:
Sleeping
Sleeping
devjas1
commited on
Commit
·
6927358
1
Parent(s):
22d9362
(UI): replace barh confidence plot with inline Unicode bars for compact display
Browse files
app.py
CHANGED
@@ -690,7 +690,13 @@ def main():
|
|
690 |
|
691 |
# ===display confidence results===
|
692 |
class_labels = ["Stable", "Weathered"]
|
693 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
694 |
|
695 |
# ===Detailed results tabs===
|
696 |
tab1, tab2, tab3 = st.tabs(
|
|
|
690 |
|
691 |
# ===display confidence results===
|
692 |
class_labels = ["Stable", "Weathered"]
|
693 |
+
st.markdown("#### 🔬 Confidence Overview")
|
694 |
+
def render_confidence_bar(prob, length=20):
|
695 |
+
filled = int(prob + length)
|
696 |
+
return "█" * filled + "░" * (length - filled)
|
697 |
+
|
698 |
+
for i, label in enumerate(class_labels):
|
699 |
+
st.write(f"**{label}**: {render_confidence_bar(probs[i])} {probs[i]*100:.1f}%")
|
700 |
|
701 |
# ===Detailed results tabs===
|
702 |
tab1, tab2, tab3 = st.tabs(
|