Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -199,7 +199,7 @@ if submitted:
|
|
| 199 |
# Making Predictions
|
| 200 |
# Passing data to pipeline to make prediction
|
| 201 |
pred_output = pipeline_of_my_model.predict(df)
|
| 202 |
-
|
| 203 |
|
| 204 |
# Interpleting prediction output for display
|
| 205 |
X= pred_output[-1]
|
|
@@ -214,12 +214,11 @@ if submitted:
|
|
| 214 |
st.markdown('''---''')
|
| 215 |
st.markdown("<h4 style='text-align: center;'> Prediction Results </h4> ", unsafe_allow_html=True)
|
| 216 |
st.success(f"Prediction: {output}")
|
| 217 |
-
#st.success(f"Confidence Probability: {prob_output}")
|
| 218 |
st.markdown('''---''')
|
| 219 |
|
| 220 |
st.subheader('Prediction Percentages:')
|
| 221 |
-
st.write('**Probablity of Person not churning is ( in % )**:',
|
| 222 |
-
st.write('**Probablity of Person not churning is ( in % )**:',
|
| 223 |
|
| 224 |
|
| 225 |
# Making expander to view all records
|
|
|
|
| 199 |
# Making Predictions
|
| 200 |
# Passing data to pipeline to make prediction
|
| 201 |
pred_output = pipeline_of_my_model.predict(df)
|
| 202 |
+
prediction_proba = pipeline_of_my_model.predict_proba(df)
|
| 203 |
|
| 204 |
# Interpleting prediction output for display
|
| 205 |
X= pred_output[-1]
|
|
|
|
| 214 |
st.markdown('''---''')
|
| 215 |
st.markdown("<h4 style='text-align: center;'> Prediction Results </h4> ", unsafe_allow_html=True)
|
| 216 |
st.success(f"Prediction: {output}")
|
|
|
|
| 217 |
st.markdown('''---''')
|
| 218 |
|
| 219 |
st.subheader('Prediction Percentages:')
|
| 220 |
+
st.write('**Probablity of Person not churning is ( in % )**:',prediction_proba[0][0]*100)
|
| 221 |
+
st.write('**Probablity of Person not churning is ( in % )**:',prediction_proba[0][1]*100)
|
| 222 |
|
| 223 |
|
| 224 |
# Making expander to view all records
|