File size: 1,080 Bytes
326d3cc
b13d358
326d3cc
 
 
 
 
 
b13d358
326d3cc
 
b13d358
 
 
 
 
 
326d3cc
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
title: Baseball Engine API
emoji: ⚾
colorFrom: blue
colorTo: gray
sdk: docker
app_port: 8000
pinned: false
short_description: GPU batting analysis and corrected SAM measurements
---

# Baseball engine API

The separate SAM measurement API is available at `/sam-batting`. It uses the Space's
`HF_TOKEN` with approved access to `facebook/sam-3d-body-vith` to prepare weights at
startup. It returns four measurement groups, per-measurement coach reviews and
four annotated videos. See `docs/SAM_BATTING_API.md` for its own contract.

GPU API for batting recordings: upload a swing, poll the job, and download the result or the coach payload. Every `/v1/` call needs `Authorization: Bearer <BASEBALL_API_KEY>`. `/readyz` returns 200 once CUDA inference has passed at startup.

This file becomes the Space's `README.md` on deploy. The GitHub workflow `.github/workflows/deploy-huggingface.yml` copies `main` on top of the Space when a push changes the app, replacing same-named files edited directly on Hugging Face. See `docs/GPU_API_DEPLOYMENT.md` and `docs/API_FOR_COACH.md`.