How madhavkumaryadav/customer-churn-prediction-with-ann- works
This repository serves bank-customer churn predictions through Streamlit: users enter profile and account details, the app reuses saved preprocessing artifacts, and a trained ANN produces a churn probability and verdict. The README also describes risk levels and a gauge; the sampled app.py shows a simpler probability-and-verdict display, while update_ui.py contains excerpts of the richer interface. Training internals are not sampled, so the graph treats the model and preprocessing files as supplied artifacts.
Main entry points: app.py Streamlit app · model.h5 Churn ANN · update_ui.py Enhanced UI · Churn_Modelling.csv Customer dataset
Components 17
User interfaces
- Streamlit app
app.py - Enhanced UI
update_ui.py - Risk and verdict
update_ui.py
Inference pipeline
- Customer inputs
app.py - Gender encoding
app.py - Geography encoding
app.py - Feature assembly
app.py - Feature scaling
app.py - Churn probability
app.py
Model artifacts
- Churn ANN
model.h5 - Gender encoder
level_encoder_gender.pkl - Geography encoder
geo_encoder.pkl - Fitted scaler
scaler.pkl
Training data
- Customer dataset
Churn_Modelling.csv - Data exploration
Explore_data.ipynb - Prediction notebook
prediction.ipynb
Other components
- Bank staff
Connections 18
- Bank staff → Streamlit app: enters details
- Bank staff → Enhanced UI: enters details
- Streamlit app → Customer inputs: collects
- Enhanced UI → Customer inputs: collects
- Streamlit app → Gender encoder: loads
- Streamlit app → Geography encoder: loads
- Streamlit app → Fitted scaler: loads
- Streamlit app → Churn ANN: loads
- Customer inputs → Gender encoding: encodes gender
- Customer inputs → Geography encoding: encodes geography
- Gender encoding → Feature assembly: provides feature
- Geography encoding → Feature assembly: provides features
- Feature assembly → Feature scaling: scales features
- Feature scaling → Churn ANN: supplies input
- Churn ANN → Churn probability: returns probability
- Churn probability → Streamlit app: displays result
- Churn probability → Risk and verdict: formats risk result
- Customer dataset → Data exploration: explored in