00Boobs00 commited on
Commit
f0f68cf
·
verified ·
1 Parent(s): bd1a54f

Update app.py from anycoder

Browse files
Files changed (1) hide show
  1. app.py +7 -0
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