GatinhoEducado
commited on
Commit
•
6927d82
1
Parent(s):
45f833a
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,8 @@ from datasets import load_dataset
|
|
6 |
from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline, WhisperTokenizer
|
7 |
|
8 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
9 |
-
tokenizer = WhisperTokenizer.from_pretrained("GatinhoEducado/whisper-tiny-finetuned-minds14", language="Portuguese", task="translate")
|
|
|
10 |
# load speech translation checkpoint
|
11 |
asr_pipe = pipeline(
|
12 |
"automatic-speech-recognition",
|
|
|
6 |
from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline, WhisperTokenizer
|
7 |
|
8 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
9 |
+
#tokenizer = WhisperTokenizer.from_pretrained("GatinhoEducado/whisper-tiny-finetuned-minds14", language="Portuguese", task="translate")
|
10 |
+
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-tiny", language="Portuguese", task="translate")
|
11 |
# load speech translation checkpoint
|
12 |
asr_pipe = pipeline(
|
13 |
"automatic-speech-recognition",
|