datnth1709 commited on
Commit
e4bd4d5
·
1 Parent(s): 5c35238

add envi traslation

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -182,7 +182,7 @@ with gr.Blocks() as demo:
182
  with gr.Column():
183
  english_out_2 = gr.Textbox(label="English Text")
184
 
185
- translate_button_vien_2.click(lambda voice: inference_vien(voice), inputs=vi_audio, outputs=english_out_2)
186
  gr.Examples(examples=vi_example_voice,
187
  inputs=[vi_audio])
188
 
@@ -201,11 +201,11 @@ with gr.Blocks() as demo:
201
  with gr.Row():
202
  with gr.Column():
203
  en_audio = gr.Audio(source="microphone", label="Input Audio", type="file", streaming=False)
204
- translate_button_envi_2 = gr.Button(value="Translate To English")
205
  with gr.Column():
206
  vietnamese_out_2 = gr.Textbox(label="English Text")
207
 
208
- translate_button_envi_2.click(lambda voice: inference_envi(voice), inputs=en_audio, outputs=vietnamese_out_2)
209
  gr.Examples(examples=en_example_voice,
210
  inputs=[en_audio])
211
 
 
182
  with gr.Column():
183
  english_out_2 = gr.Textbox(label="English Text")
184
 
185
+ translate_button_vien_2.click(lambda vi_voice: inference_vien(vi_voice), inputs=vi_audio, outputs=english_out_2)
186
  gr.Examples(examples=vi_example_voice,
187
  inputs=[vi_audio])
188
 
 
201
  with gr.Row():
202
  with gr.Column():
203
  en_audio = gr.Audio(source="microphone", label="Input Audio", type="file", streaming=False)
204
+ translate_button_envi_2 = gr.Button(value="Translate To Vietnamese")
205
  with gr.Column():
206
  vietnamese_out_2 = gr.Textbox(label="English Text")
207
 
208
+ translate_button_envi_2.click(lambda en_voice: inference_envi(en_voice), inputs=en_audio, outputs=vietnamese_out_2)
209
  gr.Examples(examples=en_example_voice,
210
  inputs=[en_audio])
211