Use a prediciton dataclass

This commit is contained in:
Jacob Windsor
2025-02-19 13:27:02 +01:00
parent d6d2325b07
commit 6d0b501620
2 changed files with 11 additions and 14 deletions
-12
View File
@@ -1,12 +0,0 @@
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]