Spaces:
Sleeping
Sleeping
Xander Labide Claude Opus 4.7 (1M context) commited on
Commit Β·
7a8a5c8
1
Parent(s): fdfe81a
Add HF Space metadata to apps/api/README.md
Browse filesDeclares app_port=8000 and Docker SDK so HF Spaces routes traffic
correctly. Documents required env vars (OPENAI_API_KEY, WEB_ORIGINS).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Farient DeckCheck API
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 8000
|
| 8 |
+
pinned: false
|
| 9 |
+
short_description: AI-powered brand-compliance review for executive decks.
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Farient DeckCheck β API
|
| 13 |
+
|
| 14 |
+
FastAPI backend for the DeckCheck multi-agent audit pipeline.
|
| 15 |
+
|
| 16 |
+
## Endpoints
|
| 17 |
+
|
| 18 |
+
- `POST /api/audits` β upload a `.pptx`, get a `job_id`
|
| 19 |
+
- `GET /api/audits` β list audits
|
| 20 |
+
- `GET /api/audits/{job_id}` β poll status
|
| 21 |
+
- `GET /api/audits/{job_id}/events` β Server-Sent Events stream
|
| 22 |
+
- `GET /api/audits/{job_id}/slides` β slides + findings
|
| 23 |
+
- `GET /api/audits/{job_id}/slides/{n}/image` β rendered slide PNG
|
| 24 |
+
- `GET /api/audits/{job_id}/export?fmt=md|json|pdf|pptx` β export
|
| 25 |
+
- `DELETE /api/audits/{job_id}` β cancel + remove
|
| 26 |
+
- `GET /health` β liveness probe
|
| 27 |
+
- `GET /health/preflight` β environment readiness checks
|
| 28 |
+
|
| 29 |
+
## Required environment variables (set in Space settings)
|
| 30 |
+
|
| 31 |
+
| Var | Purpose | Required |
|
| 32 |
+
|---|---|---|
|
| 33 |
+
| `OPENAI_API_KEY` | OpenAI API access | β
|
|
| 34 |
+
| `WEB_ORIGINS` | CORS allowlist, comma-separated origins (e.g. your Vercel URL) | β
|
|
| 35 |
+
| `OPENAI_MODEL_SLIDE` | Per-slide reviewer model (default `gpt-4o-mini`) | optional |
|
| 36 |
+
| `OPENAI_MODEL_DECK` | Deck consistency model (default `gpt-4o`) | optional |
|
| 37 |
+
| `OPENAI_MODEL_MERGE` | Lead auditor merge model (default `gpt-4o`) | optional |
|
| 38 |
+
| `OPENAI_REVIEW_CONCURRENCY` | Per-slide review concurrency (default `2`) | optional |
|
| 39 |
+
| `MAX_UPLOAD_MB` | Upload size cap (default `60`) | optional |
|
| 40 |
+
|
| 41 |
+
## Architecture
|
| 42 |
+
|
| 43 |
+
Pipeline: **parse β render** (LibreOffice, headless) β **review** (per-slide
|
| 44 |
+
single-shot `gpt-4o-mini` with deterministic safety-net injection) β
|
| 45 |
+
**deck consistency** (`gpt-4o`) β **lead auditor merge** (`gpt-4o`) β **finalize**.
|
| 46 |
+
|
| 47 |
+
Realtime UX via SSE. Job state persists at `/tmp/audits/{job_id}/` during
|
| 48 |
+
the Space's container lifetime.
|
| 49 |
+
|
| 50 |
+
Frontend: separate Next.js app deployed to Vercel that talks to this API.
|