Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,8 +37,7 @@ input_df = pd.DataFrame({
|
|
37 |
})
|
38 |
prediction = model.predict(input_df)
|
39 |
st.write(f"The estimated house price range is ${prediction[0]:,.2f}")
|
40 |
-
|
41 |
shap_values = explainer(X_test)
|
42 |
-
shap.summary_plot(shap_values, X_test)
|
43 |
-
|
44 |
-
shap_interaction_values = explainer.interaction_plot(X_test)
|
|
|
37 |
})
|
38 |
prediction = model.predict(input_df)
|
39 |
st.write(f"The estimated house price range is ${prediction[0]:,.2f}")
|
40 |
+
eexplainer = shap.Explainer(model, X_train)
|
41 |
shap_values = explainer(X_test)
|
42 |
+
shap.summary_plot(shap_values, X_test, plot_type="bar", show=False)
|
43 |
+
st.pyplot(bbox_inches='tight')
|
|