Mtkhang90 commited on
Commit
42706b2
·
verified ·
1 Parent(s): 7ff7ca4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
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
- # Loading spinner while translating
35
- with gr.Row():
36
- translate_btn = gr.Button("Translate")
37
-
38
- # Display spinner while processing
39
- with gr.Row():
40
- spinner = gr.Loading(translate_btn)
41
 
42
- # Translate when the button is clicked
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],