Skip to content

Commit

Permalink
files arranged in dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
Akashvarma26 committed Oct 19, 2024
1 parent 1f360a4 commit c81ec41
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 77 deletions.
Binary file removed ann1.h5
Binary file not shown.
12 changes: 6 additions & 6 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import pickle
import tensorflow

model = tensorflow.keras.models.load_model("ann1.h5")
ohe_geo = pickle.load(open("ohe_geo.pkl", "rb"))
le_gender = pickle.load(open("le_gender.pkl", "rb"))
sc = pickle.load(open("sc.pkl", "rb"))
model = tensorflow.keras.models.load_model("models/ann1.h5")
ohe_geo = pickle.load(open("preprocessing/ohe_geo.pkl", "rb"))
le_gender = pickle.load(open("preprocessing/le_gender.pkl", "rb"))
sc = pickle.load(open("preprocessing/sc.pkl", "rb"))

st.title("Customer Churn Predictor developed by Akashvarma26")

Expand Down Expand Up @@ -48,9 +48,9 @@
st.subheader(f"Churn Prediction Result of the customer:")
st.progress(pred_percent)
if pred_prob>0.5:
st.error(f'⚠️ {name}, the customer is likely to churn with a probability of {pred_prob:.3f}.')
st.error(f'⚠️ {name}, the customer is likely to churn. The churn probability is {pred_prob:.3f}.')
else:
st.success(f'✅ {name}, the customer is not likely to churn with a probability of {pred_prob:.3f}.')
st.success(f'✅ {name}, the customer is not likely to churn. The churn probability is {pred_prob:.3f}.')
if credit_score<500:
st.warning(f"{name}, the credit score is quite low. Customers with low credit scores might have higher churn probabilities.")
if balance==0:
Expand Down
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file added models/ann1.h5
Binary file not shown.
163 changes: 92 additions & 71 deletions notebook.ipynb

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c81ec41

Please sign in to comment.