from fastapi import FastAPI, Depends, HTTPException from sqlalchemy.orm import Session from typing import List from models.models import Laptop from schemas import LaptopCreate, LaptopResponse from database import SessionLocal, engine, Base from pydantic import BaseModel import joblib import pandas as pd import numpy as np # Загрузка модели и списка признаков model = joblib.load('laptop_price_model.pkl') feature_columns = joblib.load('feature_columns.pkl') app = FastAPI()