File size: 793 Bytes
4332634
 
 
 
 
 
9415326
4332634
 
 
9415326
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a1864b3
9415326
a1864b3
621ba56
 
 
 
 
 
 
 
 
 
 
9415326
a1864b3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
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()

```