kabita-choudhary commited on
Commit
19cd69e
·
1 Parent(s): 521fb49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- result = model.transcribe(audio_file,**translate_options)
31
- return result["text"]
 
 
 
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