Project: Put Your Model Online
Ship a complete, portfolio-ready app: a Flask web page and JSON API around a trained model, with validation, tests, CI, Docker, a cloud deployment, monitoring and a clear README.
The brief
Take a model you trained in the Machine Learning course (or the no-show model from Serving a model) and make it usable by anyone with a browser:
- a web page with a form that shows the prediction in plain language;
- a JSON API (
POST /api/v1/predict) with validation, batches and the model version in every response; /health, structured logs and a simple drift report on the inputs received so far;- tests run by GitHub Actions on every push;
- a Dockerfile and a live deployment with HTTPS and a budget alert.
Milestones
- Model bundle: pipeline, version and feature list saved with joblib; a test that loads it and checks two known predictions.
- API: the /predict endpoint with validation; tests for good input, bad input and batches.
- Web page: a Jinja form using the same validation; friendly error messages; no unescaped user input.
- Container: Dockerfile with gunicorn and a non-root user;
docker runworks locally. - CI: the GitHub Actions workflow runs pytest on every push.
- Deploy: to Render, Cloud Run, Fly.io or Hugging Face Spaces; environment variables set; health check on.
- Monitor: log each prediction (no personal data); a page or script that computes PSI on recent inputs.
Make it count
Your README should have the live link, a screenshot, an architecture diagram (browser → Flask → model, with logs and CI), how to run it locally in two commands, the API documented with an example request, and what you would do next. A deployed, tested, monitored model is something many applicants for junior ML roles cannot show; see Portfolio Projects. To add an LLM feature, combine it with the Generative AI project.
Quiz
1. Which part of the brief catches a broken model before it is deployed?
2. Why should the web form and the API share the same validation code?
📚 Further reading
Trusted, mostly free sources: official documentation, well-known textbooks and courses. When you want to confirm or go deeper on anything here, start with these.
- The Flask Mega-Tutorial (Miguel Grinberg) ↗ a long, free, much-loved tutorial
- Made With ML (MLOps course) ↗ free course on testing, serving and monitoring ML systems