Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,10 @@ device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
|
10 |
|
11 |
# load speech translation checkpoint
|
12 |
feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-base")
|
13 |
-
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-base", language="french", task="
|
14 |
|
15 |
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-base")
|
16 |
-
forced_decoder_ids = tokenizer.get_decoder_prompt_ids(language="french", task="
|
17 |
asr_pipe = pipeline(
|
18 |
"automatic-speech-recognition",
|
19 |
model=model,
|
|
|
10 |
|
11 |
# load speech translation checkpoint
|
12 |
feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-base")
|
13 |
+
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-base", language="french", task="translate")
|
14 |
|
15 |
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-base")
|
16 |
+
forced_decoder_ids = tokenizer.get_decoder_prompt_ids(language="french", task="translate")
|
17 |
asr_pipe = pipeline(
|
18 |
"automatic-speech-recognition",
|
19 |
model=model,
|