Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,12 @@ from time import time as ttime
|
|
30 |
from module.mel_processing import spectrogram_torch
|
31 |
from my_utils import load_audio
|
32 |
|
33 |
-
device = "cpu"
|
|
|
|
|
|
|
|
|
|
|
34 |
tokenizer = AutoTokenizer.from_pretrained(bert_path)
|
35 |
bert_model = AutoModelForMaskedLM.from_pretrained(bert_path)
|
36 |
if is_half == True:
|
|
|
30 |
from module.mel_processing import spectrogram_torch
|
31 |
from my_utils import load_audio
|
32 |
|
33 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
34 |
+
|
35 |
+
is_half = eval(
|
36 |
+
os.environ.get("is_half", "True" if torch.cuda.is_available() else "False")
|
37 |
+
)
|
38 |
+
|
39 |
tokenizer = AutoTokenizer.from_pretrained(bert_path)
|
40 |
bert_model = AutoModelForMaskedLM.from_pretrained(bert_path)
|
41 |
if is_half == True:
|