kkngan commited on
Commit
43930eb
1 Parent(s): 6793d9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -22,7 +22,7 @@ def load_text_to_speech_model(model="openai/whisper-base"):
22
 
23
 
24
  def translate(inputs, model="openai/whisper-base"):
25
- pipe = pipeline("automatic-speech-recognition", model=model)
26
  translate_result = pipe(inputs, generate_kwargs={'task': 'translate'})
27
  return translate_result['text']
28
 
 
22
 
23
 
24
  def translate(inputs, model="openai/whisper-base"):
25
+ pipe = load_text_to_speech_model(model=model)
26
  translate_result = pipe(inputs, generate_kwargs={'task': 'translate'})
27
  return translate_result['text']
28