SHELLAPANDIANGANHUNGING commited on
Commit
ec9a8a9
·
verified ·
1 Parent(s): bccd5bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +58 -64
app.py CHANGED
@@ -1390,72 +1390,66 @@ else:
1390
  # LEGEND — UPDATED: Stable → One Time Event, Gray → Yellow
1391
  # ===============================================================
1392
  st.subheader("Hazard Gradient Legend")
1393
- st.markdown("""
1394
- <div style="display: flex; gap: 20px;">
1395
-
1396
- <!-- Kolom 1: Worsening Trends -->
1397
- <div class="legend-box" style="flex: 1;">
1398
- <div class="legend-title"><b>Worsening Trends (Positive Slope):</b></div>
1399
- <div class="legend-item">
1400
- <div class="legend-color" style="background-color: #d32f2f;"></div>
1401
- <span>Very High Worsening (≥1.5)</span>
1402
- </div>
1403
- <div class="legend-item">
1404
- <div class="legend-color" style="background-color: #e57373;"></div>
1405
- <span>High Worsening (1.0–1.5)</span>
1406
- </div>
1407
- <div class="legend-item">
1408
- <div class="legend-color" style="background-color: #ef9a9a;"></div>
1409
- <span>Moderate Worsening (0.5–1.0)</span>
1410
- </div>
1411
- <div class="legend-item">
1412
- <div class="legend-color" style="background-color: #ffcdd2;"></div>
1413
- <span>Slight Worsening (0–0.5)</span>
1414
- </div>
1415
- <i style="display: block; margin-top: 12px; font-size: 12px; color: #666; font-style: italic;">
1416
- Note: Positive slope indicates increasing fatigue event frequency over weeks.
1417
- </i>
1418
- </div>
1419
 
1420
- <!-- Kolom 2: Improving Trends -->
1421
- <div class="legend-box" style="flex: 1;">
1422
- <div class="legend-title"><b>Improving Trends (Negative Slope):</b></div>
1423
- <div class="legend-item">
1424
- <div class="legend-color" style="background-color: #388e3c;"></div>
1425
- <span>Excellent Improvement (≤−1.5)</span>
1426
- </div>
1427
- <div class="legend-item">
1428
- <div class="legend-color" style="background-color: #81c784;"></div>
1429
- <span>Great Improvement (−1.5 to −1.0)</span>
1430
- </div>
1431
- <div class="legend-item">
1432
- <div class="legend-color" style="background-color: #a5d6a7;"></div>
1433
- <span>Good Improvement (−1.0 to −0.5)</span>
1434
- </div>
1435
- <div class="legend-item">
1436
- <div class="legend-color" style="background-color: #c8e6c9;"></div>
1437
- <span>Slight Improvement (−0.5 to 0)</span>
1438
- </div>
1439
- <i style="display: block; margin-top: 12px; font-size: 12px; color: #666; font-style: italic;">
1440
- Note: Negative slope reflects a consistent decline in fatigue events.
1441
- </i>
1442
- </div>
1443
-
1444
- <!-- Kolom 3: One-Time Events -->
1445
- <div class="legend-box" style="flex: 1;">
1446
- <div class="legend-title"><b>One-Time Events (Zero Slope):</b></div>
1447
- <div class="legend-item">
1448
- <div class="legend-color" style="background-color: #FFD700;"></div>
1449
- <span>One Time Event (0)</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1450
  </div>
1451
- <i style="display: block; margin-top: 12px; font-size: 12px; color: #666; font-style: italic;">
1452
- Note: Slope = 0 by definition when data exists for only one week.
1453
- </i>
1454
- </div>
1455
-
1456
- </div>
1457
- """, unsafe_allow_html=True)
1458
-
1459
 
1460
  # ===============================================================
1461
  # PLOT FUNCTION — UPDATED: color for slope=0 is now #FFD700
 
1390
  # LEGEND — UPDATED: Stable → One Time Event, Gray → Yellow
1391
  # ===============================================================
1392
  st.subheader("Hazard Gradient Legend")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1393
 
1394
+ st.markdown("""
1395
+ <div class="legend-container">
1396
+ <div class="legend-box">
1397
+ <div class="legend-title">Worsening Trends (Positive Slope):</div>
1398
+ <div class="legend-item">
1399
+ <div class="legend-color" style="background-color: #d32f2f;"></div>
1400
+ <span>Very High Worsening (≥1.5)</span>
1401
+ </div>
1402
+ <div class="legend-item">
1403
+ <div class="legend-color" style="background-color: #e57373;"></div>
1404
+ <span>High Worsening (1.0–1.5)</span>
1405
+ </div>
1406
+ <div class="legend-item">
1407
+ <div class="legend-color" style="background-color: #ef9a9a;"></div>
1408
+ <span>Moderate Worsening (0.5–1.0)</span>
1409
+ </div>
1410
+ <div class="legend-item">
1411
+ <div class="legend-color" style="background-color: #ffcdd2;"></div>
1412
+ <span>Slight Worsening (0–0.5)</span>
1413
+ </div>
1414
+ <i style="display: block; margin-top: 12px; font-size: 12px; color: #666; font-style: italic;">
1415
+ Note: Positive slope indicates increasing fatigue event frequency over weeks.
1416
+ </i>
1417
+ </div>
1418
+ <div class="legend-box">
1419
+ <div class="legend-title">Improving Trends (Negative Slope):</div>
1420
+ <div class="legend-item">
1421
+ <div class="legend-color" style="background-color: #388e3c;"></div>
1422
+ <span>Excellent Improvement (≤−1.5)</span>
1423
+ </div>
1424
+ <div class="legend-item">
1425
+ <div class="legend-color" style="background-color: #81c784;"></div>
1426
+ <span>Great Improvement (−1.5 to −1.0)</span>
1427
+ </div>
1428
+ <div class="legend-item">
1429
+ <div class="legend-color" style="background-color: #a5d6a7;"></div>
1430
+ <span>Good Improvement (−1.0 to −0.5)</span>
1431
+ </div>
1432
+ <div class="legend-item">
1433
+ <div class="legend-color" style="background-color: #c8e6c9;"></div>
1434
+ <span>Slight Improvement (−0.5 to 0)</span>
1435
+ </div>
1436
+ <i style="display: block; margin-top: 12px; font-size: 12px; color: #666; font-style: italic;">
1437
+ Note: Negative slope reflects a consistent decline in fatigue events.
1438
+ </i>
1439
+ </div>
1440
+ <!-- One-Time Events -->
1441
+ <div class="legend-box">
1442
+ <div class="legend-title">One-Time Events (Zero Slope):</div>
1443
+ <div class="legend-item">
1444
+ <div class="legend-color" style="background-color: #FFD700;"></div>
1445
+ <span>One Time Event (0)</span>
1446
+ </div>
1447
+ <i style="display: block; margin-top: 12px; font-size: 12px; color: #666; font-style: italic;">
1448
+ Note: Slope = 0 by definition when data exists for only one week — trend assessment is not applicable.
1449
+ </i>
1450
+ </div>
1451
  </div>
1452
+ """, unsafe_allow_html=True)
 
 
 
 
 
 
 
1453
 
1454
  # ===============================================================
1455
  # PLOT FUNCTION — UPDATED: color for slope=0 is now #FFD700