dvj4 commited on
Commit
648c165
·
1 Parent(s): 272a45e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -39,5 +39,6 @@ prediction = model.predict(input_df)
39
  st.write(f"The estimated house price range is ${prediction[0]:,.2f}")
40
  explainer = 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')
 
39
  st.write(f"The estimated house price range is ${prediction[0]:,.2f}")
40
  explainer = shap.Explainer(model, X_train)
41
  shap_values = explainer(X_test)
42
+ fig, ax = plt.subplots()
43
  shap.summary_plot(shap_values, X_test, plot_type="bar", show=False)
44
+ st.pyplot(fig, bbox_inches='tight')