File size: 677 Bytes
16b5510 |
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 |
"""Data models for pose classification API."""
from pydantic import BaseModel, Field
class PoseClassificationRequest(BaseModel):
"""Request body for pose classification endpoint."""
url: str = Field(
description="Image URL for classification"
)
class PosePrediction(BaseModel):
"""Single pose prediction result."""
label: str
score: float
class PoseClassificationResponse(BaseModel):
"""Response body for pose classification endpoint."""
model_name: str = "vit-human-pose-classification"
prediction: PosePrediction
prediction_time_ms: int = Field(
description="Time taken for inference in milliseconds"
)
|