CoolFace
Apppublic

KnowingFly/depression-detection-api

sourceHugging Facemitupdated 10mo agoView on Hugging Face
0likes
schemas.py19 linesDownload Raw Back to root
1from pydantic import BaseModel, Field2 3 4class PredictionResponse(BaseModel):5    """Response model for depression prediction endpoint."""6    prediction: str = Field(..., description="Prediction result: 'depression' or 'neutral'")7    confidence: float = Field(..., description="Confidence score between 0 and 1", ge=0.0, le=1.0)8 9 10class HealthResponse(BaseModel):11    """Response model for health check endpoint."""12    status: str = Field(..., description="Health status of the API")13    model_loaded: bool = Field(..., description="Whether the ML model is loaded successfully")14 15 16class ErrorResponse(BaseModel):17    """Response model for error responses."""18    detail: str = Field(..., description="Error message details")19