Spaces:
Running
Running
Fix device=cuda
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ from my_utils import load_audio
|
|
| 35 |
from text import cleaned_text_to_sequence
|
| 36 |
from text.cleaner import clean_text
|
| 37 |
|
| 38 |
-
device = "cuda"
|
| 39 |
tokenizer = AutoTokenizer.from_pretrained(bert_path)
|
| 40 |
bert_model = AutoModelForMaskedLM.from_pretrained(bert_path)
|
| 41 |
if is_half == True:
|
|
|
|
| 35 |
from text import cleaned_text_to_sequence
|
| 36 |
from text.cleaner import clean_text
|
| 37 |
|
| 38 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 39 |
tokenizer = AutoTokenizer.from_pretrained(bert_path)
|
| 40 |
bert_model = AutoModelForMaskedLM.from_pretrained(bert_path)
|
| 41 |
if is_half == True:
|