Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,15 +31,10 @@ def app():
|
|
| 31 |
# Multi-line text box for output (show translated text)
|
| 32 |
output_text = gr.Textbox(label="Translated Text", lines=6)
|
| 33 |
|
| 34 |
-
#
|
| 35 |
-
|
| 36 |
-
translate_btn = gr.Button("Translate")
|
| 37 |
-
|
| 38 |
-
# Display spinner while processing
|
| 39 |
-
with gr.Row():
|
| 40 |
-
spinner = gr.Loading(translate_btn)
|
| 41 |
|
| 42 |
-
#
|
| 43 |
translate_btn.click(
|
| 44 |
fn=translate_text,
|
| 45 |
inputs=[direction, input_text],
|
|
|
|
| 31 |
# Multi-line text box for output (show translated text)
|
| 32 |
output_text = gr.Textbox(label="Translated Text", lines=6)
|
| 33 |
|
| 34 |
+
# Button to trigger translation
|
| 35 |
+
translate_btn = gr.Button("Translate")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
# Asynchronous translation and updating output
|
| 38 |
translate_btn.click(
|
| 39 |
fn=translate_text,
|
| 40 |
inputs=[direction, input_text],
|