Spaces:
Sleeping
Sleeping
Update app.py from anycoder
Browse files
app.py
CHANGED
|
@@ -2,6 +2,13 @@ import gradio as gr
|
|
| 2 |
from typing import Optional, List, Dict, Any
|
| 3 |
import numpy as np
|
| 4 |
import time
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
from utils import WANVideoGenerator, LoRAManager, NSFWChecker
|
| 6 |
from config import MODEL_CONFIGS, AVAILABLE_LORAS, NSFW_CONFIG
|
| 7 |
|
|
|
|
| 2 |
from typing import Optional, List, Dict, Any
|
| 3 |
import numpy as np
|
| 4 |
import time
|
| 5 |
+
import sys
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
# Ensure local modules are prioritized over system packages
|
| 9 |
+
# This prevents ImportError when a 'utils' package exists in site-packages
|
| 10 |
+
sys.path.insert(0, str(Path(__file__).parent))
|
| 11 |
+
|
| 12 |
from utils import WANVideoGenerator, LoRAManager, NSFWChecker
|
| 13 |
from config import MODEL_CONFIGS, AVAILABLE_LORAS, NSFW_CONFIG
|
| 14 |
|