diff --git a/pages/prediction.py b/pages/prediction.py index 334456a..1044beb 100644 --- a/pages/prediction.py +++ b/pages/prediction.py @@ -463,37 +463,40 @@ def show_prediction(): with col1: # st.image(buf, caption="SHAP Waterfall Plot", use_container_width=True) + # Tambahkan CSS styling ke HTML st.markdown( - f""" - -
- SHAP Waterfall Plot -
-

SHAP Waterfall Plot

- """, - unsafe_allow_html=True - ) + """ + + """, + unsafe_allow_html=True + ) + # Gunakan `st.image()` untuk menampilkan gambar SHAP dari `buf` + st.markdown('
', unsafe_allow_html=True) + st.image(buf, caption="SHAP Waterfall Plot", use_container_width=True) + st.markdown('
', unsafe_allow_html=True) with col2: top_factors = sorted(shap_dict.items(), key=lambda x: abs(x[1]), reverse=True)[:5]