Translate to Chinese
Browse files
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 |
-
|
19 |
|
20 |
-
translate_btn.click(translate, inputs=english, outputs=
|
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 |
|