Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,10 @@
|
|
1 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
import subprocess
|
3 |
import tempfile
|
4 |
|
@@ -10,10 +16,6 @@ import torchaudio
|
|
10 |
from generator import Segment, load_csm_1b
|
11 |
from watermarking import watermark
|
12 |
|
13 |
-
# Set a default watermark key to avoid the NoneType error
|
14 |
-
if "WATERMARK_KEY" not in os.environ:
|
15 |
-
os.environ["WATERMARK_KEY"] = "0 0 0 0" # Default placeholder
|
16 |
-
|
17 |
# Simplified environment variables handling
|
18 |
gpu_timeout = int(os.getenv("GPU_TIMEOUT", 60))
|
19 |
|
|
|
1 |
import os
|
2 |
+
|
3 |
+
# Set a default watermark key to avoid the NoneType error
|
4 |
+
# Do this BEFORE any imports
|
5 |
+
if "WATERMARK_KEY" not in os.environ:
|
6 |
+
os.environ["WATERMARK_KEY"] = "0 0 0 0" # Default placeholder
|
7 |
+
|
8 |
import subprocess
|
9 |
import tempfile
|
10 |
|
|
|
16 |
from generator import Segment, load_csm_1b
|
17 |
from watermarking import watermark
|
18 |
|
|
|
|
|
|
|
|
|
19 |
# Simplified environment variables handling
|
20 |
gpu_timeout = int(os.getenv("GPU_TIMEOUT", 60))
|
21 |
|