File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ # Serving App (FastAPI + scikit-learn)
2+ ![ Python 3.11] ( https://img.shields.io/badge/Python-3.11-blue )
3+ ![ FastAPI] ( https://img.shields.io/badge/FastAPI-ready-teal )
4+ ![ Docker] ( https://img.shields.io/badge/Docker-ready-informational )
5+
6+ A tiny, production-style ML serving skeleton.
7+ Trains a scikit-learn classifier (Iris demo) and serves predictions via FastAPI.
8+
9+ - 🚀 FastAPI HTTP API (` /predict ` , ` /predict_batch ` )
10+ - 🩺 Health & version endpoints
11+ - 🧪 Simple training script + reproducible model artifact
12+ - 🐳 Dockerfile for containerized deploys
13+ - 🤖 GitHub Actions CI (smoke test)
14+
15+ ---
16+
17+ ## Quickstart
18+
19+ ### 1) Environment
20+
21+ #### Conda (recommended)
22+ ``` bash
23+ conda create -n serve_env python=3.11 -y
24+ conda activate serve_env
25+ pip install -r requirements.txt
26+ ```
27+ #### Or venv
28+ ``` bash
29+ python -m venv .venv && source .venv/bin/activate
30+ pip install -r requirements.txt
31+ ```
32+ ### 2) Train the model
33+ ``` bash
34+ python -m training.train
35+ # expected: models/model.pkl and models/meta.json
36+ ```
37+ ### 3) Run the API
38+ ``` bash
39+ uvicorn serving_app.main:app --host 0.0.0.0 --port 8011
40+ # docs: http://localhost:8011/docs
41+ ```
42+
43+
44+
45+
46+
47+
48+
49+
You can’t perform that action at this time.
0 commit comments