Team Ai
Apppublic

codeby-hp/human-pose-classification

sourceHugging Faceupdated 10mo agoView on Hugging Face
1likes
data_model.py31 linesDownload Raw Back to scripts
1"""Data models for pose classification API."""2 3from pydantic import BaseModel, Field4 5 6class PoseClassificationRequest(BaseModel):7    """Request body for pose classification endpoint."""8    url: str = Field(9        description="Image URL for classification"10    )11 12 13class PosePrediction(BaseModel):14    """Single pose prediction result."""15    label: str16    score: float17 18 19class PoseClassificationResponse(BaseModel):20    """Response body for pose classification endpoint."""21    model_name: str = "vit-human-pose-classification"22    prediction: PosePrediction23    prediction_time_ms: int = Field(24        description="Time taken for inference in milliseconds"25    )26 27 28 29 30 31