Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def whisper_demo(input_audio, model_id):
|
|
27 |
pipe = pipeline(task="automatic-speech-recognition",model=model_id, device='cuda:0')
|
28 |
pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language='en', task="transcribe")
|
29 |
output_text = pipe(input_audio)['text']
|
30 |
-
return output_text[0]
|
31 |
|
32 |
|
33 |
def translate_to_english(prompt, lang_model_id, base_lang):
|
|
|
27 |
pipe = pipeline(task="automatic-speech-recognition",model=model_id, device='cuda:0')
|
28 |
pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language='en', task="transcribe")
|
29 |
output_text = pipe(input_audio)['text']
|
30 |
+
return output_text[0]
|
31 |
|
32 |
|
33 |
def translate_to_english(prompt, lang_model_id, base_lang):
|