LethallyHealthy commited on
Commit
c450eeb
·
1 Parent(s): ebef303

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -52,9 +52,11 @@ def st_shap(plot, height=None):
52
  #The button
53
  if st.button("Calculate Your House Price!"):
54
  results = predictor.make_a_prediction(data)
55
- results_f = '{0:.2f}'.format(results[0])
56
- st.subheader('$' + results_f)
57
- st.write("Below are the SHAP graphs which can be used to explain the decisions made by the model using the features provided.")
 
 
58
  force_plot = predictor.create_shap_models(data)
59
  st_shap(force_plot)
60
 
 
52
  #The button
53
  if st.button("Calculate Your House Price!"):
54
  results = predictor.make_a_prediction(data)
55
+ opt_f = '{0:.2f}'.format(results[0][0])
56
+ unopt_f = '{0:.2f}'.format(results[0][1])
57
+ st.subheader('Optimized: $' + opt_f)
58
+ st.subheader('Unoptimized: $' + unopt_f)
59
+ st.write("Below are the SHAP graphs which can be used to explain the decisions made by the model using the features provided for the *optimized* results.")
60
  force_plot = predictor.create_shap_models(data)
61
  st_shap(force_plot)
62