Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -373,7 +373,11 @@ def create_gradio_interface():
|
|
| 373 |
audio_translate_btn.click(
|
| 374 |
process_audio,
|
| 375 |
inputs=[audio_input, source_lang, target_lang],
|
| 376 |
-
outputs=[audio_output, source_text, translated_text, performance_info]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 377 |
js="""() => {
|
| 378 |
const audioElements = document.querySelectorAll('audio');
|
| 379 |
if (audioElements.length > 0) {
|
|
@@ -390,7 +394,11 @@ def create_gradio_interface():
|
|
| 390 |
text_translate_btn.click(
|
| 391 |
process_text,
|
| 392 |
inputs=[text_input, source_lang, target_lang],
|
| 393 |
-
outputs=[text_output, source_text, translated_text, performance_info]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 394 |
js="""() => {
|
| 395 |
const audioElements = document.querySelectorAll('audio');
|
| 396 |
if (audioElements.length > 0) {
|
|
@@ -407,4 +415,4 @@ def create_gradio_interface():
|
|
| 407 |
|
| 408 |
if __name__ == "__main__":
|
| 409 |
demo = create_gradio_interface()
|
| 410 |
-
demo.launch(
|
|
|
|
| 373 |
audio_translate_btn.click(
|
| 374 |
process_audio,
|
| 375 |
inputs=[audio_input, source_lang, target_lang],
|
| 376 |
+
outputs=[audio_output, source_text, translated_text, performance_info]
|
| 377 |
+
).then(
|
| 378 |
+
None,
|
| 379 |
+
None,
|
| 380 |
+
None,
|
| 381 |
js="""() => {
|
| 382 |
const audioElements = document.querySelectorAll('audio');
|
| 383 |
if (audioElements.length > 0) {
|
|
|
|
| 394 |
text_translate_btn.click(
|
| 395 |
process_text,
|
| 396 |
inputs=[text_input, source_lang, target_lang],
|
| 397 |
+
outputs=[text_output, source_text, translated_text, performance_info]
|
| 398 |
+
).then(
|
| 399 |
+
None,
|
| 400 |
+
None,
|
| 401 |
+
None,
|
| 402 |
js="""() => {
|
| 403 |
const audioElements = document.querySelectorAll('audio');
|
| 404 |
if (audioElements.length > 0) {
|
|
|
|
| 415 |
|
| 416 |
if __name__ == "__main__":
|
| 417 |
demo = create_gradio_interface()
|
| 418 |
+
demo.launch(share=True, debug=True)
|