How mitesh256/customer_churn_predictor works
ChurnSight collects a customer profile in a Streamlit interface, sends it to a FastAPI prediction endpoint, and displays churn probability, risk, and a stay/churn verdict. The API validates and maps inputs into the model’s feature order before predicting. The tree also includes an EDA/training notebook and saved model artifacts; the notebook’s internal workflow is not sampled, so its artifact-production links are not shown.
Main entry points: api.py Prediction endpoint · app.py Profile and results · best_model.pkl Trained model · feature_names.pkl Feature order
Components 8
Customer interface
- Profile and results
app.py
Prediction service
- Prediction endpoint
api.py - Validate and map features
api.py - Churn prediction
api.py
Model assets
- Trained model
best_model.pkl - Feature order
feature_names.pkl
Model development
- EDA and training
eda_and_training.ipynb
Other components
- Customer
Connections 9
- Customer → Profile and results: enters profile
- Profile and results → Prediction endpoint: POST /predict
- Prediction endpoint → Validate and map features: validates and maps
- Prediction endpoint → Feature order: loads feature order
- Prediction endpoint → Trained model: loads model
- Prediction endpoint → Churn prediction: predicts
- Churn prediction → Trained model: predicts with
- Prediction endpoint → Profile and results: returns prediction
- Profile and results → Customer: shows verdict