Real-Time ML API
A scalable, secure machine learning inference API with logging, monitoring, and versioning.
Year
2024
Service
Web Design
Category
ML
Tool
MLOps Mini Project
Concept:
A lightweight, end-to-end MLOps pipeline demonstrating how to train, serve, containerize, and deploy a machine learning model using FastAPI for inference and Streamlit for visualization, orchestrated through Docker and automated with GitHub Actions CI/CD.
Problem Solved:
Shows how to take a simple ML model from training to production with proper structure: API serving, frontend UI, Dockerized microservices, automated builds, and repeatable workflows.
Scope:
Input:
CSV dataset used for training a scikit-learn model.Process:
A minimal but complete MLOps workflow:Model Training: Train a model using scikit-learn and serialize with joblib.
Backend Inference API (FastAPI): Load model, serve predictions via REST.
Frontend Dashboard (Streamlit): Interactive UI for sending predictions and viewing results.
Containerization: Dockerfiles for backend and frontend, orchestrated using Docker Compose.
CI/CD: GitHub Actions pipeline that builds images and validates code on every push or PR.
Output:
REST API docs, interactive dashboard, working Docker microservices, and CI/CD pipeline validation.
Features:
Simple reproducible MLOps template
Train → Serve → Visualize pipeline
FastAPI backend for inference
Streamlit dashboard for UI interaction
Docker Compose for local deployment
GitHub Actions workflow for automated builds
Organized project structure (API, frontend, models, src)
Ready for extension into a larger MLOps system
Tech Stack:
Backend: FastAPI
Frontend: Streamlit
ML Framework: Scikit-learn
Language: Python 3.12
Containerization: Docker, Docker Compose
CI/CD: GitHub Actions
Utilities: pandas, numpy, joblib
Project Structure (High Level):
src/— Training scriptmodels/— Saved trained modelapp/— FastAPI backendfrontend/— Streamlit dashboard.github/workflows/— CI/CD pipelinesdocker-compose.yml— Service orchestrationDockerfile.fa— Backend containerfrontend/Dockerfile.dashboard— Frontend container
Performance:
(Light project — no heavy metrics)
FastAPI response time: low-latency JSON inference
Streamlit dashboard loads instantly
Dockerized startup < 15 seconds
CI/CD builds containers automatically
Future Improvements:
Add monitoring (Prometheus + Grafana)
Deploy using Kubernetes
Add automated model retraining
Add unit/integration tests
Publish images to Docker Hub / AWS ECR
GitHub Repository:
https://github.com/Shodexco/mlops-mini-project
API Documentation (Local Dev):
http://localhost:8000/docs
Streamlit Dashboard:
http://localhost:8501
CI/CD Pipeline (GitHub Actions):
https://github.com/Shodexco/mlops-mini-project/actions




