Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1710,15 +1710,16 @@ if col_shift and col_shift in df.columns:
|
|
| 1710 |
for shift_val in shift_counts.index:
|
| 1711 |
shift_pct = (shift_counts[shift_val] / len(df)) * 100
|
| 1712 |
|
| 1713 |
-
# Metric-style card
|
| 1714 |
st.markdown(
|
| 1715 |
f"""
|
| 1716 |
<div style="
|
| 1717 |
padding: 12px 16px;
|
| 1718 |
-
border-radius:
|
| 1719 |
-
background-color: #
|
| 1720 |
-
border: 1px solid #
|
| 1721 |
margin-bottom: 10px;
|
|
|
|
| 1722 |
">
|
| 1723 |
<div style="font-size: 16px; font-weight: 600;">
|
| 1724 |
Shift {shift_val} Alerts
|
|
@@ -1733,7 +1734,7 @@ if col_shift and col_shift in df.columns:
|
|
| 1733 |
</div>
|
| 1734 |
</div>
|
| 1735 |
""",
|
| 1736 |
-
unsafe_allow_html=True
|
| 1737 |
)
|
| 1738 |
|
| 1739 |
# Risk Message
|
|
@@ -1748,6 +1749,7 @@ if col_shift and col_shift in df.columns:
|
|
| 1748 |
else:
|
| 1749 |
st.info("Shift data not available for Shift Pattern Analysis.")
|
| 1750 |
|
|
|
|
| 1751 |
# 4. Operator Risk Profiling
|
| 1752 |
if col_operator and col_operator in df.columns:
|
| 1753 |
operator_alerts = df[col_operator].value_counts()
|
|
|
|
| 1710 |
for shift_val in shift_counts.index:
|
| 1711 |
shift_pct = (shift_counts[shift_val] / len(df)) * 100
|
| 1712 |
|
| 1713 |
+
# Metric-style card (PASTIKAN unsafe_allow_html=True)
|
| 1714 |
st.markdown(
|
| 1715 |
f"""
|
| 1716 |
<div style="
|
| 1717 |
padding: 12px 16px;
|
| 1718 |
+
border-radius: 12px;
|
| 1719 |
+
background-color: #ffffff;
|
| 1720 |
+
border: 1px solid #eee;
|
| 1721 |
margin-bottom: 10px;
|
| 1722 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
| 1723 |
">
|
| 1724 |
<div style="font-size: 16px; font-weight: 600;">
|
| 1725 |
Shift {shift_val} Alerts
|
|
|
|
| 1734 |
</div>
|
| 1735 |
</div>
|
| 1736 |
""",
|
| 1737 |
+
unsafe_allow_html=True # <-- WAJIB ADA INI
|
| 1738 |
)
|
| 1739 |
|
| 1740 |
# Risk Message
|
|
|
|
| 1749 |
else:
|
| 1750 |
st.info("Shift data not available for Shift Pattern Analysis.")
|
| 1751 |
|
| 1752 |
+
|
| 1753 |
# 4. Operator Risk Profiling
|
| 1754 |
if col_operator and col_operator in df.columns:
|
| 1755 |
operator_alerts = df[col_operator].value_counts()
|