Spaces:
Sleeping
Sleeping
Download src/api/schemas.py from MataStrategy/ground-zero: direct link, hf CLI and curl.
- Browser
- Download file 748 Bytes
-
https://huggingface.co/spaces/MataStrategy/ground-zero/resolve/33c3a5a043c862783e8e464ad34b4959ca50b213/src/api/schemas.py
- Command line
-
hf download hf://spaces/MataStrategy/ground-zero@33c3a5a043c862783e8e464ad34b4959ca50b213/src/api/schemas.py
-
curl -L -o schemas.py https://huggingface.co/spaces/MataStrategy/ground-zero/resolve/33c3a5a043c862783e8e464ad34b4959ca50b213/src/api/schemas.py
748 Bytes
| """Pydantic v2 request and response models for all API endpoints.""" | |
| from __future__ import annotations | |
| from typing import Literal, Optional | |
| from pydantic import BaseModel, Field | |
| class TranscribeResponse(BaseModel): | |
| text: str | |
| language: str | |
| duration_s: float | |
| processing_time_ms: int | |
| confidence: Optional[float] = None | |
| class IoTQueryResponse(BaseModel): | |
| transcription: str | |
| language: str | |
| intent: dict | |
| sensor_data: dict | |
| voice_response: str | |
| processing_time_ms: int | |
| class HealthResponse(BaseModel): | |
| status: str | |
| model_loaded: bool | |
| active_adapter: Optional[str] | |
| adapters_available: list[str] | |
| adapters_loaded: list[str] | |
| class ErrorResponse(BaseModel): | |
| error: str | |
| detail: str | |