β Watch it directly on YouTube
ML API that predicts binary classes using scikit-learn and FastAPI.
- Model trained on breast cancer dataset
- REST API with FastAPI - real-time requests
- Docker support
- Environment variable configuration
- Citable research-ready API
- MIT Licensed
.
βββ app/ # FastAPI application
βββ train/ # Training scripts
βββ assets/images/ # Images, diagrams
βββ requirements.txt # Python dependencies
βββ Dockerfile
βββ .env.dist # Sample environment variables
βββ LICENSE.md
βββ README.md
- Clone the repository:
git clone https://github.com/your-username/Python_GML_MLPipeline.git
cd Python_GML_MLPipeline- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Copy
.env.distto.envand configure your environment variables:
PORT=8000
MODEL_PATH=train/model.pkl- Train the model:
cd train/
python train_model.py
cd ..- Start the server:
uvicorn app.main:app --reload --port $PORT- Build the Docker image:
docker build -t ml-api .- Run the container:
docker run --env-file .env -p 8000:8000 ml-apiVisit http://127.0.0.1:8000/docs for Swagger UI.
Made with β€οΈ by Pierre-Henry Soria. A super passionate & enthusiastic Problem-Solver / Senior Software Engineer. Also a true cheese π§, ristretto βοΈ, and dark chocolate lover! π
Distributed under the MIT License π Happy hacking! π€
