ahmadtalha commited on
Commit
ee8c60e
1 Parent(s): 9af51bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -280,7 +280,7 @@ outputs = [
280
  gr.Audio(label="Audio Output (Native Language) 3"),
281
  gr.Audio(label="Audio Output (Target Language) 3")
282
  ]
283
- def update_outputs(image, file, audio, text, input_language, target_language):
284
  final_text, top_phrases, translations, audio_outputs = process_input(
285
  image=image, file=file, audio=audio, text=text,
286
  translatefrom=input_language, translateto=target_language
@@ -303,8 +303,8 @@ def update_outputs(image, file, audio, text, input_language, target_language):
303
  *translated_phrases_outputs
304
  )
305
 
306
- def interface_func(image, file, audio, text, input_language, target_language):
307
- return update_outputs(image, file, audio, text, input_language, target_language)
308
 
309
  # Create the Gradio interface
310
  iface = gr.Interface(fn=interface_func, inputs=inputs, outputs=outputs, title=title, description=description)
 
280
  gr.Audio(label="Audio Output (Native Language) 3"),
281
  gr.Audio(label="Audio Output (Target Language) 3")
282
  ]
283
+ def update_outputs(inputlanguage, target_language, audio, image, text, file):
284
  final_text, top_phrases, translations, audio_outputs = process_input(
285
  image=image, file=file, audio=audio, text=text,
286
  translatefrom=input_language, translateto=target_language
 
303
  *translated_phrases_outputs
304
  )
305
 
306
+ def interface_func(inputlanguage, target_language, audio, image, text, file):
307
+ return update_outputs(inputlanguage, target_language, audio, image, text, file)
308
 
309
  # Create the Gradio interface
310
  iface = gr.Interface(fn=interface_func, inputs=inputs, outputs=outputs, title=title, description=description)