Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import spaces
|
|
| 7 |
from chatterbox.tts_turbo import ChatterboxTurboTTS
|
| 8 |
|
| 9 |
# Check for GPU, but ZeroGPU handles the actual assignment dynamically
|
| 10 |
-
DEVICE = "
|
| 11 |
|
| 12 |
EVENT_TAGS = [
|
| 13 |
"[clear throat]", "[sigh]", "[shush]", "[cough]", "[groan]",
|
|
@@ -97,8 +97,10 @@ def generate(
|
|
| 97 |
):
|
| 98 |
# Reload model inside the GPU context if it was lost (ZeroGPU quirk)
|
| 99 |
if model is None:
|
| 100 |
-
model = ChatterboxTurboTTS.from_pretrained(
|
| 101 |
|
|
|
|
|
|
|
| 102 |
if seed_num != 0:
|
| 103 |
set_seed(int(seed_num))
|
| 104 |
|
|
|
|
| 7 |
from chatterbox.tts_turbo import ChatterboxTurboTTS
|
| 8 |
|
| 9 |
# Check for GPU, but ZeroGPU handles the actual assignment dynamically
|
| 10 |
+
DEVICE = "cpu"
|
| 11 |
|
| 12 |
EVENT_TAGS = [
|
| 13 |
"[clear throat]", "[sigh]", "[shush]", "[cough]", "[groan]",
|
|
|
|
| 97 |
):
|
| 98 |
# Reload model inside the GPU context if it was lost (ZeroGPU quirk)
|
| 99 |
if model is None:
|
| 100 |
+
model = ChatterboxTurboTTS.from_pretrained("cpu")
|
| 101 |
|
| 102 |
+
model.to("cuda")
|
| 103 |
+
|
| 104 |
if seed_num != 0:
|
| 105 |
set_seed(int(seed_num))
|
| 106 |
|