Adding arhitecture

This commit is contained in:
Артём Алейкин 2024-10-13 16:38:23 +04:00
parent f294a3d33d
commit 847bb0694e
7 changed files with 22 additions and 19 deletions

View File

0
requirements.txt Normal file
View File

View File

@ -1,19 +0,0 @@
from pydantic import BaseModel
class LaptopBase(BaseModel):
title: str
price: float
processor: str
ram: int
ssd: int
display: float
class LaptopCreate(LaptopBase):
price: float
class LaptopResponse(LaptopBase):
id: int
price: float
class Config:
orm_mode = True

22
schemas/schemas.py Normal file
View File

@ -0,0 +1,22 @@
from pydantic import BaseModel
class LaptopCreate(BaseModel):
processor: str
ram: int
os: str
ssd: int
display: float
class LaptopResponse(BaseModel):
id: int
processor: str
ram: int
os: str
ssd: int
display: float
class Config:
orm_mode = True
class PredictPriceResponse(BaseModel):
predicted_price: float

0
services/service.py Normal file
View File