Put a trained scikit-learn pipeline behind a small web API, so other programs can send a JSON row and get a prediction back — with input validation, a health check and tests, as a real service would have.
Project idea · ungraded
Serve Your Model with FastAPI
You will use
Milestones
Build the smallest working version first. Ticks are saved in this browser only.
Stretch goals
- Accept a batch of rows in one request.
- Log each prediction with a timestamp and add GET /stats with simple counts.
- Package the service in a Dockerfile.
Data
Use the model and data from the capstone (synthetic churn data you generate) or from the house-price project. See model persistence for saving pipelines.
Run it yourself
pip install fastapi uvicorn scikit-learn joblib pandas httpx
uvicorn app:app --reload
Then open http://127.0.0.1:8000/docs to try the endpoints. See running a server manually.