Spaces:
Runtime error
Runtime error
kabita-choudhary
commited on
Commit
·
19cd69e
1
Parent(s):
521fb49
Update app.py
Browse files
app.py
CHANGED
@@ -27,8 +27,11 @@ def translate(input_video):
|
|
27 |
|
28 |
options = dict(beam_size=5, best_of=5)
|
29 |
translate_options = dict(task="translate", **options)
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
32 |
block = gr.Blocks()
|
33 |
with block:
|
34 |
|
|
|
27 |
|
28 |
options = dict(beam_size=5, best_of=5)
|
29 |
translate_options = dict(task="translate", **options)
|
30 |
+
transcribe_options = dict(task="transcribe", **options)
|
31 |
+
result_translate = model.transcribe(audio_file,**translate_options)
|
32 |
+
result_transcribe = model.transcribe(audio_file,**transcribe_options)
|
33 |
+
|
34 |
+
return result_transcribe["text"]+" ---Translated text in english ---- "+result_translate["text"]
|
35 |
block = gr.Blocks()
|
36 |
with block:
|
37 |
|