Spaces:
Runtime error
Runtime error
tonic
commited on
Commit
•
2ffde05
1
Parent(s):
d06a6fd
refactor the interface display
Browse files
app.py
CHANGED
@@ -261,18 +261,18 @@ inputs = [
|
|
261 |
|
262 |
outputs = [
|
263 |
RichTextbox(label="Processed Text"),
|
264 |
-
gr.Audio(label="Audio Output (Native Language) 1"),
|
265 |
-
gr.Audio(label="Audio Output (Target Language) 1"),
|
266 |
-
gr.Audio(label="Audio Output (Native Language) 2"),
|
267 |
-
gr.Audio(label="Audio Output (Target Language) 2"),
|
268 |
-
gr.Audio(label="Audio Output (Native Language) 3"),
|
269 |
-
gr.Audio(label="Audio Output (Target Language) 3"),
|
270 |
gr.Textbox(label="Focus 1"),
|
271 |
gr.Textbox(label="Translated Phrases 1"),
|
|
|
|
|
272 |
gr.Textbox(label="Focus 2"),
|
273 |
gr.Textbox(label="Translated Phrases 2"),
|
|
|
|
|
274 |
gr.Textbox(label="Focus 3"),
|
275 |
-
gr.Textbox(label="Translated Phrases 3")
|
|
|
|
|
276 |
]
|
277 |
def update_outputs(image, file, audio, text, input_language, target_language):
|
278 |
final_text, top_phrases, translations, audio_outputs = process_input(
|
|
|
261 |
|
262 |
outputs = [
|
263 |
RichTextbox(label="Processed Text"),
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
gr.Textbox(label="Focus 1"),
|
265 |
gr.Textbox(label="Translated Phrases 1"),
|
266 |
+
gr.Audio(label="Audio Output (Native Language) 1"),
|
267 |
+
gr.Audio(label="Audio Output (Target Language) 1"),
|
268 |
gr.Textbox(label="Focus 2"),
|
269 |
gr.Textbox(label="Translated Phrases 2"),
|
270 |
+
gr.Audio(label="Audio Output (Native Language) 2"),
|
271 |
+
gr.Audio(label="Audio Output (Target Language) 2"),
|
272 |
gr.Textbox(label="Focus 3"),
|
273 |
+
gr.Textbox(label="Translated Phrases 3"),
|
274 |
+
gr.Audio(label="Audio Output (Native Language) 3"),
|
275 |
+
gr.Audio(label="Audio Output (Target Language) 3")
|
276 |
]
|
277 |
def update_outputs(image, file, audio, text, input_language, target_language):
|
278 |
final_text, top_phrases, translations, audio_outputs = process_input(
|