Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -67,13 +67,15 @@ def buil_UI(X):
|
|
67 |
|
68 |
input_val = buil_UI(X)
|
69 |
|
|
|
|
|
|
|
70 |
if st.button('Calculate House Price'):
|
71 |
predictLGBM = model.predict(input_val)
|
72 |
-
|
73 |
-
|
74 |
-
st.write(st.write('Predicted house price is: $',predictLGBM[0]))
|
75 |
-
|
76 |
#input_val
|
|
|
77 |
shap_values = shap.TreeExplainer(model).shap_values(input_val)
|
78 |
fig_summary = shap.summary_plot(shap_values, input_val)
|
79 |
st.pyplot(fig_summary)
|
@@ -83,6 +85,7 @@ if st.button('Calculate House Price'):
|
|
83 |
st.pyplot(interaction_fig)
|
84 |
|
85 |
# X
|
|
|
86 |
shap_values_X = shap.TreeExplainer(model).shap_values(X)
|
87 |
fig_summary_X = shap.summary_plot(shap_values_X, X)
|
88 |
st.pyplot(fig_summary_X)
|
|
|
67 |
|
68 |
input_val = buil_UI(X)
|
69 |
|
70 |
+
st.markdown(""" <style> .font {font-size:50px ; font-family: 'Cooper Black'; color: #FF9633;} </style> """, unsafe_allow_html=True)
|
71 |
+
st.markdown('<p class="font">House price prediction - Apply LightGBM Hyperparameter Tuning with Optuna</p>', unsafe_allow_html=True)
|
72 |
+
|
73 |
if st.button('Calculate House Price'):
|
74 |
predictLGBM = model.predict(input_val)
|
75 |
+
st.write('Predicted house price is: $',predictLGBM[0])
|
76 |
+
|
|
|
|
|
77 |
#input_val
|
78 |
+
st.write('SHAP Summary Plot and Interaction Summary Plot for this predicted house')
|
79 |
shap_values = shap.TreeExplainer(model).shap_values(input_val)
|
80 |
fig_summary = shap.summary_plot(shap_values, input_val)
|
81 |
st.pyplot(fig_summary)
|
|
|
85 |
st.pyplot(interaction_fig)
|
86 |
|
87 |
# X
|
88 |
+
st.write('SHAP Summary Plot and Interaction Summary Plot for train dataset')
|
89 |
shap_values_X = shap.TreeExplainer(model).shap_values(X)
|
90 |
fig_summary_X = shap.summary_plot(shap_values_X, X)
|
91 |
st.pyplot(fig_summary_X)
|