Spaces:
Sleeping
Sleeping
metadata
title: ML Auto Deployment
emoji: π
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
π Automated ML Deployment System
A production-grade, fully automated end-to-end Machine Learning operations (MLOps) pipeline. This system automates the entire lifecycle of a modelβfrom training to containerized deploymentβensuring that every code change triggers a fresh model iteration and a seamless update to a Premium Interactive Dashboard on Hugging Face Spaces.
β¨ Key Features
- π¨ Premium Interactive UI: A modern, glassmorphism-inspired dashboard for real-time model interaction.
- π Full CI/CD Pipeline: Automated training and deployment via GitHub Actions.
- π§ Auto-Training: Automatically retrains the Random Forest model on every push to
main. - π³ Containerized Serving: Uses Docker for consistent environments across development and production.
- β‘ Real-time Predictions: Instant feedback as you adjust feature sliders on the web interface.
- βοΈ Serverless Deployment: Optimized for cost and performance on Hugging Face Spaces.
ποΈ Architecture Overview
graph TD
A[Code Push to GitHub] --> B{GitHub Actions}
B --> C[Install Dependencies]
C --> D[Train Model - Scikit-Learn]
D --> E[Export model.joblib]
E --> F[Build Docker Image]
F --> G[Deploy to Hugging Face Spaces]
G --> H[Live FastAPI API & Static UI]
H --> I[User Interaction via Sliders]
I --> J[Real-time Prediction Result]
π οΈ Tech Stack
| Category | Technology |
|---|---|
| Language | Python 3.10 |
| ML Framework | Scikit-Learn, Pandas |
| Frontend | Vanilla HTML5, CSS3 (Glassmorphism), JavaScript (ES6+) |
| API Framework | FastAPI, Uvicorn |
| CI/CD | GitHub Actions |
| Containerization | Docker |
| Hosting | Hugging Face Spaces |
π Quick Start
Local Development
To run this project locally:
Clone & Setup:
git clone https://github.com/SadeepSachintha/Automated-ML-Deployment-System.git cd "Automated ML Deployment System" python -m venv venv source venv/bin/activate # venv\Scripts\activate on WindowsInstall & Train:
pip install -r model/requirements.txt pip install -r app/requirements.txt python model/train.pyLaunch Dashboard:
uvicorn app.main:app --reload --port 8000Visit
http://localhost:8000to see the interactive UI.
π‘ API Documentation
While the primary interaction is via the web UI, the underlying API is fully accessible:
- Health Check:
GET /health - Prediction:
POST /predict{ "sepal_length": 5.1, "sepal_width": 3.5, "petal_length": 1.4, "petal_width": 0.2 }
π Project Structure
app/: FastAPI application and serving logic.static/: [NEW] Premium frontend assets (HTML/CSS/JS).model_data/: Serialized model binaries.
model/: Training scripts and model definitions..github/workflows/: CI/CD pipeline definitions.k8s/: Kubernetes manifests (Legacy AWS EKS config).Dockerfile: Production container configuration.
π License
MIT License - see the LICENSE file for details.