From 847bb0694e3137661595140ded947b6d8e8efa57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=90=D0=BB=D0=B5=D0=B9?= =?UTF-8?q?=D0=BA=D0=B8=D0=BD?= Date: Sun, 13 Oct 2024 16:38:23 +0400 Subject: [PATCH] Adding arhitecture --- controllers/controller.py | 0 models.py => models/models.py | 0 requirements.txt | 0 schemas.py | 19 ------------------ schemas/schemas.py | 22 +++++++++++++++++++++ modelBuilder.py => services/modelBuilder.py | 0 services/service.py | 0 7 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 controllers/controller.py rename models.py => models/models.py (100%) create mode 100644 requirements.txt delete mode 100644 schemas.py create mode 100644 schemas/schemas.py rename modelBuilder.py => services/modelBuilder.py (100%) create mode 100644 services/service.py diff --git a/controllers/controller.py b/controllers/controller.py new file mode 100644 index 0000000..e69de29 diff --git a/models.py b/models/models.py similarity index 100% rename from models.py rename to models/models.py diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/schemas.py b/schemas.py deleted file mode 100644 index a19e9b2..0000000 --- a/schemas.py +++ /dev/null @@ -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 diff --git a/schemas/schemas.py b/schemas/schemas.py new file mode 100644 index 0000000..39a2b85 --- /dev/null +++ b/schemas/schemas.py @@ -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 diff --git a/modelBuilder.py b/services/modelBuilder.py similarity index 100% rename from modelBuilder.py rename to services/modelBuilder.py diff --git a/services/service.py b/services/service.py new file mode 100644 index 0000000..e69de29