from pydantic import BaseModel, Field class PredictionResponse(BaseModel): """Response model for depression prediction endpoint.""" prediction: str = Field(..., description="Prediction result: 'depression' or 'neutral'") confidence: float = Field(..., description="Confidence score between 0 and 1", ge=0.0, le=1.0) class HealthResponse(BaseModel): """Response model for health check endpoint.""" status: str = Field(..., description="Health status of the API") model_loaded: bool = Field(..., description="Whether the ML model is loaded successfully") class ErrorResponse(BaseModel): """Response model for error responses.""" detail: str = Field(..., description="Error message details")