Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# FastAPI Inference Template 🚀
|
| 6 |
+
|
| 7 |
+
A lightweight template to wrap any 🤗 Transformers model as an API with FastAPI.
|
| 8 |
+
|
| 9 |
+
## Endpoints
|
| 10 |
+
- `GET /` → health check
|
| 11 |
+
- `POST /predict` → run inference
|
| 12 |
+
|
| 13 |
+
## Example Usage
|
| 14 |
+
```bash
|
| 15 |
+
curl -X POST "http://localhost:8000/predict" \
|
| 16 |
+
-H "Content-Type: application/json" \
|
| 17 |
+
-d '{"text": "Markets are looking strong today"}'
|