Spaces:
Runtime error
Runtime error
cocktailpeanut
commited on
Commit
·
d143d17
1
Parent(s):
8b1a278
update
Browse files
app.py
CHANGED
@@ -5,7 +5,13 @@ import torch
|
|
5 |
from parler_tts import ParlerTTSForConditionalGeneration
|
6 |
from transformers import AutoTokenizer, AutoFeatureExtractor, set_seed
|
7 |
|
8 |
-
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
|
11 |
repo_id = "parler-tts/parler_tts_mini_v0.1"
|
|
|
5 |
from parler_tts import ParlerTTSForConditionalGeneration
|
6 |
from transformers import AutoTokenizer, AutoFeatureExtractor, set_seed
|
7 |
|
8 |
+
#device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
9 |
+
if torch.cuda.is_available():
|
10 |
+
device = "cuda"
|
11 |
+
elif torch.backends.mps.is_available():
|
12 |
+
device = "mps"
|
13 |
+
else:
|
14 |
+
device = "cpu"
|
15 |
|
16 |
|
17 |
repo_id = "parler-tts/parler_tts_mini_v0.1"
|