SHELLAPANDIANGANHUNGING commited on
Commit
5ebb77a
·
verified ·
1 Parent(s): b3783b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +56 -56
app.py CHANGED
@@ -1405,25 +1405,25 @@ if not df_loc.empty:
1405
  html = df_display.to_html(escape=False, index=False, table_id="tbl-locations")
1406
  st.markdown(f"<div class='predictive-table-wrapper'>{html}</div>", unsafe_allow_html=True)
1407
 
1408
- st.markdown(
1409
- "<div class='predictive-note'>"
1410
- "<strong>Criteria:</strong> Coverage < 90% AND negative slope. "
1411
- "High-risk: steep negative slope + low baseline activity."
1412
- "</div>",
1413
- unsafe_allow_html=True
1414
- )
1415
-
1416
- else:
1417
- st.markdown(
1418
- "<div class='predictive-table-wrapper'>"
1419
- "<p style='text-align:center; color:#666; padding:24px; font-style:italic;'>"
1420
- "No locations meet criteria: Coverage < 90% and negative trend."
1421
- "</p>"
1422
- "<div class='warning-box'>"
1423
- "💡 Note: Locations with Coverage ≥ 90% are excluded — they are considered stable reporting zones."
1424
- "</div>"
1425
- "</div>",
1426
- unsafe_allow_html=True
1427
  )
1428
  st.markdown("</div>", unsafe_allow_html=True)
1429
 
@@ -1441,23 +1441,23 @@ if not df_div.empty:
1441
  html = df_display.to_html(escape=False, index=False, table_id="tbl-divisions")
1442
  st.markdown(f"<div class='predictive-table-wrapper'>{html}</div>", unsafe_allow_html=True)
1443
 
1444
- st.markdown(
1445
- "<div class='predictive-note'>"
1446
- "<strong>Forecast Inspection:</strong> "
1447
- "<span class='status-active'>Active</span> (0 gaps), "
1448
- "<span class='status-neutral'>Neutral</span> (1–2 gaps), "
1449
- "<span class='status-inactive'>Inactive</span> (>2 gaps)."
1450
- "</div>",
1451
- unsafe_allow_html=True
1452
- )
1453
- else:
1454
- st.markdown(
1455
- "<div class='predictive-table-wrapper'>"
1456
- "<p style='text-align:center; color:#666; padding:24px; font-style:italic;'>"
1457
- "Insufficient division data (≥2 months required)."
1458
- "</p></div>",
1459
- unsafe_allow_html=True
1460
- )
1461
 
1462
  st.markdown("</div>", unsafe_allow_html=True)
1463
 
@@ -1485,26 +1485,26 @@ if not df_issue.empty:
1485
  html = df_display.to_html(escape=False, index=False, table_id="tbl-issues")
1486
  st.markdown(f"<div class='predictive-table-wrapper'>{html}</div>", unsafe_allow_html=True)
1487
 
1488
- st.markdown(
1489
- "<div class='predictive-note'>"
1490
- "<strong>Filtered:</strong> Reported every month (100% coverage) with increasing trend. "
1491
- "<strong>Avg/Month</strong> = total ÷ months. "
1492
- "<span class='trend-rising'>High-Risk Rising</span> = slope > 0.2."
1493
- "</div>",
1494
- unsafe_allow_html=True
1495
- )
1496
-
1497
- else:
1498
- st.markdown(
1499
- "<div class='predictive-table-wrapper'>"
1500
- "<p style='text-align:center; color:#c62828; padding:24px; font-weight:500;'>"
1501
- "⚠️ No rising categories with 100% monthly coverage."
1502
- "</p>"
1503
- "<p style='text-align:center; color:#666; font-size:0.9em;'>"
1504
- "Consider relaxing coverage filter if data is sparse."
1505
- "</p></div>",
1506
- unsafe_allow_html=True
1507
- )
1508
 
1509
  st.markdown("</div>", unsafe_allow_html=True)
1510
 
 
1405
  html = df_display.to_html(escape=False, index=False, table_id="tbl-locations")
1406
  st.markdown(f"<div class='predictive-table-wrapper'>{html}</div>", unsafe_allow_html=True)
1407
 
1408
+ # st.markdown(
1409
+ # "<div class='predictive-note'>"
1410
+ # "<strong>Criteria:</strong> Coverage < 90% AND negative slope. "
1411
+ # "High-risk: steep negative slope + low baseline activity."
1412
+ # "</div>",
1413
+ # unsafe_allow_html=True
1414
+ # )
1415
+
1416
+ # else:
1417
+ # st.markdown(
1418
+ # "<div class='predictive-table-wrapper'>"
1419
+ # "<p style='text-align:center; color:#666; padding:24px; font-style:italic;'>"
1420
+ # "No locations meet criteria: Coverage < 90% and negative trend."
1421
+ # "</p>"
1422
+ # "<div class='warning-box'>"
1423
+ # "💡 Note: Locations with Coverage ≥ 90% are excluded — they are considered stable reporting zones."
1424
+ # "</div>"
1425
+ # "</div>",
1426
+ # unsafe_allow_html=True
1427
  )
1428
  st.markdown("</div>", unsafe_allow_html=True)
1429
 
 
1441
  html = df_display.to_html(escape=False, index=False, table_id="tbl-divisions")
1442
  st.markdown(f"<div class='predictive-table-wrapper'>{html}</div>", unsafe_allow_html=True)
1443
 
1444
+ # st.markdown(
1445
+ # "<div class='predictive-note'>"
1446
+ # "<strong>Forecast Inspection:</strong> "
1447
+ # "<span class='status-active'>Active</span> (0 gaps), "
1448
+ # "<span class='status-neutral'>Neutral</span> (1–2 gaps), "
1449
+ # "<span class='status-inactive'>Inactive</span> (>2 gaps)."
1450
+ # "</div>",
1451
+ # unsafe_allow_html=True
1452
+ # )
1453
+ # else:
1454
+ # st.markdown(
1455
+ # "<div class='predictive-table-wrapper'>"
1456
+ # "<p style='text-align:center; color:#666; padding:24px; font-style:italic;'>"
1457
+ # "Insufficient division data (≥2 months required)."
1458
+ # "</p></div>",
1459
+ # unsafe_allow_html=True
1460
+ # )
1461
 
1462
  st.markdown("</div>", unsafe_allow_html=True)
1463
 
 
1485
  html = df_display.to_html(escape=False, index=False, table_id="tbl-issues")
1486
  st.markdown(f"<div class='predictive-table-wrapper'>{html}</div>", unsafe_allow_html=True)
1487
 
1488
+ # st.markdown(
1489
+ # "<div class='predictive-note'>"
1490
+ # "<strong>Filtered:</strong> Reported every month (100% coverage) with increasing trend. "
1491
+ # "<strong>Avg/Month</strong> = total ÷ months. "
1492
+ # "<span class='trend-rising'>High-Risk Rising</span> = slope > 0.2."
1493
+ # "</div>",
1494
+ # unsafe_allow_html=True
1495
+ # )
1496
+
1497
+ # else:
1498
+ # st.markdown(
1499
+ # "<div class='predictive-table-wrapper'>"
1500
+ # "<p style='text-align:center; color:#c62828; padding:24px; font-weight:500;'>"
1501
+ # "⚠️ No rising categories with 100% monthly coverage."
1502
+ # "</p>"
1503
+ # "<p style='text-align:center; color:#666; font-size:0.9em;'>"
1504
+ # "Consider relaxing coverage filter if data is sparse."
1505
+ # "</p></div>",
1506
+ # unsafe_allow_html=True
1507
+ # )
1508
 
1509
  st.markdown("</div>", unsafe_allow_html=True)
1510