End-to-end Machine Learning project for predicting customer churn.
Includes:
-
Data preprocessing
-
Model training (Random Forest)
-
Pickle model generation
-
Deployment using FastAPI, Flask, Streamlit, Gradio
-
HTML + CSS frontend
git clone https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git
cd YOUR-REPO-NAME
curl -Ls https://astral.sh/uv/install.sh | sh
irm https://astral.sh/uv/install.ps1 | iex
uv --version
uv venv
.venv\Scripts\activate
source .venv/bin/activate
uv sync
python train_model.py
python deployments/flask/flask_app.py
uvicorn deployments.fastapi.fastapi_app:app --reload
streamlit run deployments/streamlit_app.py
python deployments/gradio_app.py
.
βββ data/
β βββ churn.csv
βββ models/
β βββ churn_model.pkl
βββ deployments/
β βββ flask/
β βββ fastapi/
β βββ streamlit_app.py
β βββ gradio_app.py
βββ train_model.py
βββ pyproject.toml
βββ README.md
-
Train the model before running any app.
-
Entire preprocessing + model is saved inside pickle.
-
No manual encoding required in deployment.
-
SMOTE (if used) is only for training, never for production API.
You now have a fully working ML project with multiple deployment options.