Skip to content

Commit 160baec

Browse files
author
Kyle Spengler
committed
docs: add Quickstart step 3 (Run the API)
1 parent 3d4af6f commit 160baec

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+

0 commit comments

Comments
 (0)