Initial Real-ESRGAN API project setup

This commit is contained in:
Developer
2026-02-16 19:56:25 +01:00
commit 0e59652575
34 changed files with 3668 additions and 0 deletions

31
app/schemas/models.py Normal file
View File

@@ -0,0 +1,31 @@
"""Schemas for model management operations."""
from typing import List
from pydantic import BaseModel, Field
class ModelDownloadRequest(BaseModel):
"""Request to download models."""
models: List[str] = Field(
description='List of model names to download'
)
provider: str = Field(
default='huggingface',
description='Repository provider (huggingface, gdrive, etc.)'
)
class ModelDownloadResponse(BaseModel):
"""Response from model download."""
success: bool
message: str
downloaded: List[str] = Field(default_factory=list)
failed: List[str] = Field(default_factory=list)
errors: dict = Field(default_factory=dict)
class ModelListResponse(BaseModel):
"""Response containing list of models."""
available_models: List[dict]
total_models: int
local_models: int