2025-02-19 11:59:11 +01:00

12 lines
463 B
Python

from pydantic import BaseModel, Field
from typing import List
class HousePredictionInput(BaseModel):
square_feet: float = Field(..., gt=0, description="Square footage of the house")
bedrooms: int = Field(..., ge=1, description="Number of bedrooms")
bathrooms: float = Field(..., gt=0, description="Number of bathrooms")
class HousePredictionOutput(BaseModel):
predicted_price: float
confidence_score: float
similar_listings: List[float]