from pydantic import BaseModel from typing import Optional class LaptopCreate(BaseModel): brand: str processor: str ram: int os: str ssd: int display: float gpu: str weight: float battery_size: int release_year: int display_type: str class LaptopResponse(BaseModel): id: int brand: str processor: str ram: int os: str ssd: int display: float gpu: str weight: float battery_size: int release_year: int display_type: str class Config: orm_mode = True class PredictPriceResponse(BaseModel): predicted_price: float