Spaces:
Build error
Build error
LethallyHealthy
commited on
Commit
·
c450eeb
1
Parent(s):
ebef303
Update app.py
Browse files
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 |
-
|
56 |
-
|
57 |
-
st.
|
|
|
|
|
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 |
|