24 lines
661 B
Python
24 lines
661 B
Python
from pydantic import BaseModel
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
# UserCreate: для создания пользователя
|
|
class UserCreate(BaseModel):
|
|
username: str
|
|
password: str
|
|
|
|
# CSVFileUpload: для загрузки CSV файла
|
|
class CSVFileUpload(BaseModel):
|
|
file_path: str
|
|
|
|
# H5ModelCreate: для добавления модели
|
|
class H5ModelCreate(BaseModel):
|
|
path_model: str
|
|
|
|
# ModelStatisticsCreate: для сохранения статистики модели
|
|
class ModelStatisticsCreate(BaseModel):
|
|
id_model: int
|
|
accuracy: float
|
|
loss: float
|
|
created_at: Optional[datetime] = None
|