Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
import os
|
2 |
import torch
|
3 |
import gradio as gr
|
4 |
-
from TTS.tts.models.xtts import XttsArgs
|
|
|
5 |
from TTS.api import TTS
|
6 |
|
7 |
|
@@ -10,6 +11,7 @@ os.environ["COQUI_TOS_AGREED"] = "1"
|
|
10 |
|
11 |
|
12 |
torch.serialization.safe_globals([XttsArgs])
|
|
|
13 |
|
14 |
# ✅ Force full checkpoint loading
|
15 |
def safe_load_checkpoint(model_path):
|
|
|
1 |
import os
|
2 |
import torch
|
3 |
import gradio as gr
|
4 |
+
from TTS.tts.models.xtts import XttsArgs
|
5 |
+
from TTS.tts.configs.xtts_config import XttsConfig # ✅ Import required class
|
6 |
from TTS.api import TTS
|
7 |
|
8 |
|
|
|
11 |
|
12 |
|
13 |
torch.serialization.safe_globals([XttsArgs])
|
14 |
+
torch.serialization.safe_globals([XttsConfig])
|
15 |
|
16 |
# ✅ Force full checkpoint loading
|
17 |
def safe_load_checkpoint(model_path):
|