Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 =
|
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 |
|