|
Download README.md from csmith715/ais-api: direct link, hf CLI and curl.
- Browser
- Download file 793 Bytes
-
https://huggingface.co/spaces/csmith715/ais-api/resolve/main/README.md
- Command line
-
hf download hf://spaces/csmith715/ais-api/README.md
-
curl -L -o README.md https://huggingface.co/spaces/csmith715/ais-api/resolve/main/README.md
793 Bytes
| title: Ais Api | |
| emoji: 🦀 | |
| colorFrom: yellow | |
| colorTo: gray | |
| sdk: docker | |
| app_port: 7860 | |
| pinned: false | |
| # YOLO Weld Type Detector — FastAPI | |
| A simple REST API around an Ultralytics YOLO model for weld-type detection. | |
| ## Endpoints | |
| - `GET /health` — quick status | |
| - `POST /predict` — run detection | |
| ### Auth (optional) | |
| Set a secret named `API_TOKEN` in your Space (Settings ▸ Secrets). | |
| Send requests with `Authorization: Bearer <token>`. | |
| ### Python POST (with Requests) | |
| ``` | |
| from pathlib import Path | |
| import requests | |
| SPACE_URL = "https://csmith715-ais-api.hf.space/predict" | |
| IMG_PATH = Path("path-to-weld-file.jpg") | |
| with IMG_PATH.open("rb") as f: | |
| files = {"file": (IMG_PATH.name, f, "image/jpeg")} | |
| r = requests.post(SPACE_URL, files=files, timeout=100) | |
| r.json() | |
| ``` |