Spaces:
Paused
Paused
Fix module structure: relocate engine package to resolve app namespace
Browse files- app.py +2 -2
- app/main.py +1 -1
- engine/__init__.py +0 -0
- {app/engine → engine}/pipeline.py +2 -2
- {app/engine → engine}/upscaler.py +0 -0
- {app/engine → engine}/vectorizer.py +0 -0
app.py
CHANGED
|
@@ -25,8 +25,8 @@ for path, url in MODEL_URLS.items():
|
|
| 25 |
print(f"Downloading {path.name}...")
|
| 26 |
urllib.request.urlretrieve(url, path)
|
| 27 |
|
| 28 |
-
from
|
| 29 |
-
from
|
| 30 |
|
| 31 |
upscaler = AI2DUpscaler(models_dir=MODELS_DIR)
|
| 32 |
STORAGE_DIR = BASE_DIR / "storage"
|
|
|
|
| 25 |
print(f"Downloading {path.name}...")
|
| 26 |
urllib.request.urlretrieve(url, path)
|
| 27 |
|
| 28 |
+
from engine.upscaler import AI2DUpscaler
|
| 29 |
+
from engine.vectorizer import Vectorizer
|
| 30 |
|
| 31 |
upscaler = AI2DUpscaler(models_dir=MODELS_DIR)
|
| 32 |
STORAGE_DIR = BASE_DIR / "storage"
|
app/main.py
CHANGED
|
@@ -12,7 +12,7 @@ from fastapi import FastAPI, File, Form, UploadFile, HTTPException
|
|
| 12 |
from fastapi.responses import HTMLResponse, FileResponse, JSONResponse
|
| 13 |
from fastapi.staticfiles import StaticFiles
|
| 14 |
|
| 15 |
-
from
|
| 16 |
|
| 17 |
|
| 18 |
app = FastAPI(
|
|
|
|
| 12 |
from fastapi.responses import HTMLResponse, FileResponse, JSONResponse
|
| 13 |
from fastapi.staticfiles import StaticFiles
|
| 14 |
|
| 15 |
+
from engine.pipeline import ProcessingPipeline
|
| 16 |
|
| 17 |
|
| 18 |
app = FastAPI(
|
engine/__init__.py
ADDED
|
File without changes
|
{app/engine → engine}/pipeline.py
RENAMED
|
@@ -10,8 +10,8 @@ import uuid
|
|
| 10 |
from typing import Optional, Dict, Any
|
| 11 |
from PIL import Image
|
| 12 |
|
| 13 |
-
from
|
| 14 |
-
from
|
| 15 |
|
| 16 |
|
| 17 |
@dataclass
|
|
|
|
| 10 |
from typing import Optional, Dict, Any
|
| 11 |
from PIL import Image
|
| 12 |
|
| 13 |
+
from engine.upscaler import AI2DUpscaler
|
| 14 |
+
from engine.vectorizer import Vectorizer
|
| 15 |
|
| 16 |
|
| 17 |
@dataclass
|
{app/engine → engine}/upscaler.py
RENAMED
|
File without changes
|
{app/engine → engine}/vectorizer.py
RENAMED
|
File without changes
|