Spaces:
Runtime error
Runtime error
ahmadtalha
commited on
Update app.py
Browse files
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(
|
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(
|
307 |
-
return update_outputs(
|
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)
|