Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1157,6 +1157,7 @@ import pandas as pd
|
|
| 1157 |
import numpy as np
|
| 1158 |
import plotly.graph_objects as go
|
| 1159 |
# =================== OBJECTIVE 5: Operator Fatigue Risk Gradient Dashboard =====================
|
|
|
|
| 1160 |
|
| 1161 |
st.subheader("OBJECTIVE 5: See Your Team’s Fatigue Hazard Profile!")
|
| 1162 |
|
|
@@ -1384,11 +1385,11 @@ else:
|
|
| 1384 |
all_coal = get_all_operators_with_slope(coal_data)
|
| 1385 |
|
| 1386 |
# ===============================================================
|
| 1387 |
-
# LEGEND — UPDATED:
|
| 1388 |
# ===============================================================
|
| 1389 |
st.subheader("Hazard Gradient Legend")
|
| 1390 |
st.markdown("""
|
| 1391 |
-
<div class="legend-container"
|
| 1392 |
<!-- Worsening Trends -->
|
| 1393 |
<div class="legend-box">
|
| 1394 |
<div class="legend-title">Worsening Trends (Positive Slope):</div>
|
|
@@ -1672,6 +1673,7 @@ else:
|
|
| 1672 |
except Exception as e:
|
| 1673 |
st.error(f"Error in Top 10 Operator analysis: {str(e)}")
|
| 1674 |
st.exception(e) # optionally show full traceback during dev
|
|
|
|
| 1675 |
# =================== OBJECTIVE 6: Automated Insights & AI Recommendations =====================
|
| 1676 |
st.subheader("OBJECTIVE 6: Instant Insights & Recommendations")
|
| 1677 |
|
|
|
|
| 1157 |
import numpy as np
|
| 1158 |
import plotly.graph_objects as go
|
| 1159 |
# =================== OBJECTIVE 5: Operator Fatigue Risk Gradient Dashboard =====================
|
| 1160 |
+
# =================== OBJECTIVE 5: Operator Fatigue Risk Gradient Dashboard =====================
|
| 1161 |
|
| 1162 |
st.subheader("OBJECTIVE 5: See Your Team’s Fatigue Hazard Profile!")
|
| 1163 |
|
|
|
|
| 1385 |
all_coal = get_all_operators_with_slope(coal_data)
|
| 1386 |
|
| 1387 |
# ===============================================================
|
| 1388 |
+
# LEGEND — UPDATED: 3 kotak horizontal, notes inside each box, "Worsening" labels
|
| 1389 |
# ===============================================================
|
| 1390 |
st.subheader("Hazard Gradient Legend")
|
| 1391 |
st.markdown("""
|
| 1392 |
+
<div class="legend-container">
|
| 1393 |
<!-- Worsening Trends -->
|
| 1394 |
<div class="legend-box">
|
| 1395 |
<div class="legend-title">Worsening Trends (Positive Slope):</div>
|
|
|
|
| 1673 |
except Exception as e:
|
| 1674 |
st.error(f"Error in Top 10 Operator analysis: {str(e)}")
|
| 1675 |
st.exception(e) # optionally show full traceback during dev
|
| 1676 |
+
|
| 1677 |
# =================== OBJECTIVE 6: Automated Insights & AI Recommendations =====================
|
| 1678 |
st.subheader("OBJECTIVE 6: Instant Insights & Recommendations")
|
| 1679 |
|