Update README.md
Browse files
README.md
CHANGED
|
@@ -7,13 +7,24 @@ sdk: "docker"
|
|
| 7 |
pinned: true
|
| 8 |
---
|
| 9 |
|
| 10 |
-
# Brain (
|
| 11 |
|
| 12 |
-
|
| 13 |
-
- GET /health → { ok: true }
|
| 14 |
-
- POST /echo (json) → echoes back your payload with ts
|
| 15 |
|
| 16 |
-
|
| 17 |
-
- /ws/echo → accepts text frames and echoes back {"event":"echo","text":"..."}
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
pinned: true
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# Brain (Skeleton)
|
| 11 |
|
| 12 |
+
A minimal FastAPI service to glue STT/TTS and client UI. It echoes inputs, writes JSONL logs, and streams them via SSE.
|
|
|
|
|
|
|
| 13 |
|
| 14 |
+
## Endpoints
|
|
|
|
| 15 |
|
| 16 |
+
- GET /health — service status
|
| 17 |
+
- POST /process — accepts arbitrary JSON and logs it
|
| 18 |
+
- GET /stream/logs — Server-Sent Events stream of recent and live events
|
| 19 |
+
- POST /log_error — log an error event
|
| 20 |
+
|
| 21 |
+
## Quick Test (PowerShell)
|
| 22 |
+
|
| 23 |
+
```powershell
|
| 24 |
+
curl.exe --ssl-no-revoke https://<your-brain>.hf.space/health
|
| 25 |
+
|
| 26 |
+
Invoke-RestMethod -Method Post -Uri 'https://<your-brain>.hf.space/process' `
|
| 27 |
+
-Headers @{ 'Content-Type'='application/json' } `
|
| 28 |
+
-Body '{"test":"hello"}'
|
| 29 |
+
|
| 30 |
+
curl.exe --ssl-no-revoke "https://<your-brain>.hf.space/stream/logs"
|