← Back

MLOps Sentiment API (Auto-deploy CI/CD)

5/20/2025

A production-grade microservice serving 5K+ requests at ~150 ms latency. The API delivers sub-150 ms sentiment inference, seamless model versioning, and drift-ready monitoring—turning raw text into {label, score} with reliability that's cheap to run and easy to evolve.

What we built

  • FastAPI endpoint around a pretrained DistilBERT model (Transformers)
  • Dockerized service, published to GitHub Container Registry via GitHub Actions
  • One-click deploy to Render; platform port binding handled automatically
  • Auto-generated Swagger docs, plus a cURLable /predict JSON route
  • Zero-downtime updates: each commit builds a new image and redeploys
  • Lean stack keeps memory under ~300MB (fits free/low-cost tiers)
  • Auth-ready middleware stubs and Evidently drift hooks for future growth

Why it matters

  • Ship ML value behind a stable interface, not notebooks
  • Update models or code in minutes with safe rollouts
  • Control cost while staying production-ready
MLOpsFastAPITransformersDockerCI/CDRenderGHCR