PredictFlow is a containerized machine learning application designed to predict customer churn probability. This project demonstrates a complete, end-to-end machine learning pipeline, seamlessly bridging the gap between data exploration, model training, and production-ready deployment.
- 🧠 Predictive Modeling: Utilizes a custom TensorFlow neural network to accurately classify customer churn risk.
- 🔄 Robust Data Pipeline: Includes automated data cleaning, feature engineering, and preprocessing workflows.
- 📊 Interactive UI: A Streamlit dashboard enables real-time inference and intuitive visualization of prediction results.
- 🗄️ Persistent Logging: Stores prediction history in a local SQLite database for easy auditing and tracking.
- 🐳 Containerization: Fully Dockerized to guarantee consistent, reproducible execution across any environment.
- Language: Python
- ML Frameworks: TensorFlow, Keras, Scikit-Learn
- Frontend: Streamlit
- Dependency Management: Poetry (
pyproject.toml) - Database: SQLite
- Deployment: Docker
The repository is organized to maintain a clear separation between research, model artifacts, and application logic:
.
├── data/ # Raw and processed datasets
├── models/ # Trained .keras models and .pkl scalers
├── notebooks/ # Jupyter notebooks for EDA and model experimentation
├── Dockerfile # Production-ready container definition
├── main.py # Streamlit application entry point
├── utils.py # Preprocessing and inference logic helpers
├── pyproject.toml # Dependency management (Poetry)
└── README.md # Project documentation
The fastest way to run PredictFlow is by using the pre-built Docker image hosted on Docker Hub. No local Python environment setup is required!
Pull the latest pre-built image directly from Docker Hub:
docker pull alsesd/churn-service:latestStart the application and map the necessary ports and volumes:
docker run -d -p 8501:8501 -v $(pwd)/data:/app/data --name predictflow alsesd/churn-service:latest(Note: The -d flag runs the container in the background, and -v ensures your local data folder is mounted so the SQLite database persists between restarts).
Open your web browser and navigate to: 👉 http://localhost:8501
💡 Local Build Alternative: If you have made code changes and want to build the image yourself instead of pulling from Docker Hub, run:
docker build -t alsesd/churn-service:latest .Then run thedocker runcommand from Step 2.