Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1709,30 +1709,7 @@ with col_insights:
|
|
| 1709 |
for shift_val in shift_counts.index:
|
| 1710 |
shift_pct = (shift_counts[shift_val] / len(df)) * 100
|
| 1711 |
# Ganti st.metric dengan HTML custom
|
| 1712 |
-
st.markdown(
|
| 1713 |
-
f"""
|
| 1714 |
-
<div style="
|
| 1715 |
-
background-color:#fff9c4;
|
| 1716 |
-
padding:12px 16px;
|
| 1717 |
-
border-radius:10px;
|
| 1718 |
-
border:1px solid #eee;
|
| 1719 |
-
margin-bottom:10px;
|
| 1720 |
-
">
|
| 1721 |
-
<div style="font-size:16px; font-weight:600;">
|
| 1722 |
-
Shift {shift_val} Alerts
|
| 1723 |
-
</div>
|
| 1724 |
-
|
| 1725 |
-
<div style="font-size:28px; font-weight:700; margin-top:4px;">
|
| 1726 |
-
{shift_counts[shift_val]}
|
| 1727 |
-
</div>
|
| 1728 |
-
|
| 1729 |
-
<div style="font-size:14px; font-weight:700; margin-top:-2px;">
|
| 1730 |
-
<span style="color:#d32f2f;">↑ {shift_pct:.1f}% of total alerts</span>
|
| 1731 |
-
</div>
|
| 1732 |
-
</div>
|
| 1733 |
-
""",
|
| 1734 |
-
unsafe_allow_html=True
|
| 1735 |
-
)
|
| 1736 |
|
| 1737 |
if shift_pct > 50:
|
| 1738 |
st.warning(f"Shift {shift_val} has disproportionately high alerts ({shift_pct:.1f}%). Review shift scheduling and workload.")
|
|
|
|
| 1709 |
for shift_val in shift_counts.index:
|
| 1710 |
shift_pct = (shift_counts[shift_val] / len(df)) * 100
|
| 1711 |
# Ganti st.metric dengan HTML custom
|
| 1712 |
+
st.markdown(f"""<div style="font-size: 24px; font-weight: bold;">{shift_counts[shift_val]}</div><div style="color: red; font-size: 14px; margin-top: -5px;">↑ {shift_pct:.1f}% of total alerts</div>""", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1713 |
|
| 1714 |
if shift_pct > 50:
|
| 1715 |
st.warning(f"Shift {shift_val} has disproportionately high alerts ({shift_pct:.1f}%). Review shift scheduling and workload.")
|