SHELLAPANDIANGANHUNGING commited on
Commit
d86f792
·
verified ·
1 Parent(s): 1f148b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -1658,6 +1658,14 @@ else:
1658
  st.error(f"Error in Top 10 Operator analysis: {str(e)}")
1659
  st.exception(e) # optionally show full traceback during dev
1660
 
 
 
 
 
 
 
 
 
1661
  # =================== OBJECTIVE 6: Automated Insights & AI Recommendations =====================
1662
  st.subheader("OBJECTIVE 6: Instant Insights & Recommendations")
1663
 
@@ -1873,8 +1881,9 @@ try:
1873
 
1874
  except Exception as e:
1875
  st.error(f"Error in Objective 6: {e}")
1876
- st.exception(e) # Untuk debugging lebih lanjutt
1877
 
1878
  # ================= FOOTER ===========================
1879
  st.markdown("---")
1880
- st.markdown('<div class="footer">FatigueAnalyzer - Transforming Mining Safety with Intelligent Analytics | Contact: info@bukittechnology.com</div>', unsafe_allow_html=True)
 
 
1658
  st.error(f"Error in Top 10 Operator analysis: {str(e)}")
1659
  st.exception(e) # optionally show full traceback during dev
1660
 
1661
+ Baik, berikut adalah **versi Objective 6 yang sudah diperbaiki**, di mana **semua angka persentase** (`X.X% of total alerts`) dalam **teks biasa, `st.warning`, `st.info`, dan `data_point`** akan berwarna **merah (`#d32f2f`)**.
1662
+
1663
+ Perubahan utama:
1664
+ 1. Ganti `st.warning` dan `st.info` yang berisi teks persentase dengan `st.markdown(..., unsafe_allow_html=True)`.
1665
+ 2. Ganti `st.metric` dengan `st.markdown` untuk mendukung HTML.
1666
+ 3. Bungkus teks persentase dalam `<span style="color:#d32f2f; font-weight:bold;">...</span>`.
1667
+
1668
+ ```python
1669
  # =================== OBJECTIVE 6: Automated Insights & AI Recommendations =====================
1670
  st.subheader("OBJECTIVE 6: Instant Insights & Recommendations")
1671
 
 
1881
 
1882
  except Exception as e:
1883
  st.error(f"Error in Objective 6: {e}")
1884
+ st.exception(e) # Untuk debugging lebih lanjut
1885
 
1886
  # ================= FOOTER ===========================
1887
  st.markdown("---")
1888
+ st.markdown('<div class="footer">FatigueAnalyzer - Transforming Mining Safety with Intelligent Analytics | Contact: info@bukittechnology.com</div>', unsafe_allow_html=True)
1889
+ ```