TurtleLiu commited on
Commit
8117850
1 Parent(s): f8e4eee

Translate to Chinese

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,9 +15,9 @@ with gr.Blocks() as demo:
15
  english = gr.Textbox(label="English text")
16
  translate_btn = gr.Button(value="Translate")
17
  with gr.Column():
18
- german = gr.Textbox(label="Chinese Text")
19
 
20
- translate_btn.click(translate, inputs=english, outputs=german, api_name="translate-to-german")
21
  examples = gr.Examples(examples=["I went to the supermarket yesterday.", "Helen is a good swimmer."],
22
  inputs=[english])
23
 
 
15
  english = gr.Textbox(label="English text")
16
  translate_btn = gr.Button(value="Translate")
17
  with gr.Column():
18
+ chinese = gr.Textbox(label="Chinese Text")
19
 
20
+ translate_btn.click(translate, inputs=english, outputs=chinese, api_name="translate-to-chinese")
21
  examples = gr.Examples(examples=["I went to the supermarket yesterday.", "Helen is a good swimmer."],
22
  inputs=[english])
23