π Live Demo on Streamlit Cloud
This project is a machine learning web application that predicts whether a bank customer is likely to churn. The app is built using Streamlit and powered by a Random Forest classifier trained on customer data.
- Upload a CSV file containing customer data
- Predict churn using a trained ML model
- View predictions in a simple web interface
- Reusable
.pkl
model for fast inference - Organized project structure with dataset included
bank-customer-churn-prediction/ β βββ app.py # Streamlit app βββ random_forest_churn_model.pkl # Trained ML model βββ requirements.txt # Required Python libraries βββ README.md # Project documentation βββ streamlit_ui.png # Screenshot of the app βββ dataset/ # Folder containing data files β βββ churn_data.xlsx # Dataset used for training β βββ sample_input.xlsx # Sample file for upload testing
I trained multiple classification models including:
- Logistic Regression
- Support Vector Machine (SVM)
- Random Forest β
Random Forest gave the best performance:
- Accuracy: 85%
- Precision: 83%
- Recall: 81%
So it was selected for final deployment.
- Python
- Pandas, Scikit-learn
- Streamlit
- Joblib
The dataset includes customer demographic details, account activity, and churn labels. It's located in the dataset/ folder:
churn_data.xlsx β Used for training
sample_input.xlsx β Used for testing with the app