Spaces:
Running
Running
Kikirilkov
commited on
Commit
•
3410032
1
Parent(s):
c885bbd
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ import torch
|
|
12 |
from TTS.api import TTS
|
13 |
|
14 |
# Get device
|
15 |
-
device = "
|
16 |
|
17 |
# Init TTS
|
18 |
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
|
|
|
12 |
from TTS.api import TTS
|
13 |
|
14 |
# Get device
|
15 |
+
device = "cpu" if torch.cuda.is_available() else "cpu"
|
16 |
|
17 |
# Init TTS
|
18 |
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
|