|
Download README.md from api-lab/fastapi-inference-template: direct link, hf CLI and curl.
- Browser
- Download file 398 Bytes
-
https://huggingface.co/api-lab/fastapi-inference-template/resolve/main/README.md
- Command line
-
hf download hf://api-lab/fastapi-inference-template/README.md
-
curl -L -o README.md https://huggingface.co/api-lab/fastapi-inference-template/resolve/main/README.md
398 Bytes
| license: apache-2.0 | |
| # FastAPI Inference Template 🚀 | |
| A lightweight template to wrap any 🤗 Transformers model as an API with FastAPI. | |
| ## Endpoints | |
| - `GET /` → health check | |
| - `POST /predict` → run inference | |
| ## Example Usage | |
| ```bash | |
| curl -X POST "http://localhost:8000/predict" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"text": "Markets are looking strong today"}' |