| from __future__ import annotations | |
| from pydantic import BaseModel, Field | |
| class HouseFeatures(BaseModel): | |
| OverallQual: int = Field(7, ge=1, le=10) | |
| GrLivArea: int = Field(1800, ge=200) | |
| GarageCars: int = Field(2, ge=0, le=5) | |
| TotalBsmtSF: int = Field(1000, ge=0) | |
| FullBath: int = Field(2, ge=0, le=5) | |
| YearBuilt: int = Field(1995, ge=1800, le=2026) | |
| Neighborhood: str = "Somerst" | |
| HouseStyle: str = "2Story" | |
| class PredictionResponse(BaseModel): | |
| predicted_price: float | |
| currency: str = "USD" | |