2024-12-17 01:01:44 +04:00
|
|
|
from pydantic import BaseModel
|
|
|
|
from datetime import datetime
|
2024-12-17 00:31:14 +04:00
|
|
|
from typing import Optional
|
|
|
|
|
2024-12-17 01:01:44 +04:00
|
|
|
# UserCreate: для создания пользователя
|
|
|
|
class UserCreate(BaseModel):
|
|
|
|
username: str
|
|
|
|
password: str
|
|
|
|
|
|
|
|
# CSVFileUpload: для загрузки CSV файла
|
|
|
|
class CSVFileUpload(BaseModel):
|
|
|
|
file_path: str
|
|
|
|
|
|
|
|
# H5ModelCreate: для добавления модели
|
|
|
|
class H5ModelCreate(BaseModel):
|
2024-12-18 21:29:26 +04:00
|
|
|
path_model: str
|
2024-12-17 01:01:44 +04:00
|
|
|
|
|
|
|
# ModelStatisticsCreate: для сохранения статистики модели
|
|
|
|
class ModelStatisticsCreate(BaseModel):
|
2024-12-18 21:29:26 +04:00
|
|
|
id_model: int
|
2024-12-17 01:01:44 +04:00
|
|
|
accuracy: float
|
|
|
|
loss: float
|
|
|
|
created_at: Optional[datetime] = None
|