mrfakename
commited on
Commit
•
1272fd4
1
Parent(s):
bae65ff
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ os.system('python -m unidic download')
|
|
7 |
from melo.api import TTS
|
8 |
speed = 1.0
|
9 |
import tempfile
|
10 |
-
device = 'cuda'
|
11 |
models = {
|
12 |
'EN': TTS(language='EN', device=device),
|
13 |
'ES': TTS(language='ES', device=device),
|
|
|
7 |
from melo.api import TTS
|
8 |
speed = 1.0
|
9 |
import tempfile
|
10 |
+
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
11 |
models = {
|
12 |
'EN': TTS(language='EN', device=device),
|
13 |
'ES': TTS(language='ES', device=device),
|