Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -53,8 +53,12 @@ MODEL = Xtts.init_from_config(config)
|
|
53 |
MODEL.load_checkpoint(
|
54 |
config, checkpoint_dir=checkpoint_dir, use_deepspeed=use_deepspeed
|
55 |
)
|
|
|
56 |
if torch.cuda.is_available():
|
57 |
-
|
|
|
|
|
|
|
58 |
|
59 |
supported_languages = config.languages
|
60 |
if not "vi" in supported_languages:
|
|
|
53 |
MODEL.load_checkpoint(
|
54 |
config, checkpoint_dir=checkpoint_dir, use_deepspeed=use_deepspeed
|
55 |
)
|
56 |
+
|
57 |
if torch.cuda.is_available():
|
58 |
+
device = torch.device("cuda")
|
59 |
+
else:
|
60 |
+
device = torch.device("cpu")
|
61 |
+
MODEL.to(device)
|
62 |
|
63 |
supported_languages = config.languages
|
64 |
if not "vi" in supported_languages:
|