Update app.py
Browse files
app.py
CHANGED
@@ -24,9 +24,12 @@ with gr.Blocks() as demo:
|
|
24 |
zh_to_en_button = gr.Button("Chinese to English")
|
25 |
en_to_zh_button = gr.Button("English to Chinese")
|
26 |
swap_button = gr.Button("Swap")
|
|
|
27 |
|
28 |
zh_to_en_button.click(translate_zh_to_en, inputs=input_text, outputs=output_text)
|
29 |
en_to_zh_button.click(translate_en_to_zh, inputs=input_text, outputs=output_text)
|
30 |
swap_button.click(swap_text, inputs=[input_text, output_text], outputs=[input_text, output_text])
|
|
|
|
|
31 |
|
32 |
demo.launch()
|
|
|
24 |
zh_to_en_button = gr.Button("Chinese to English")
|
25 |
en_to_zh_button = gr.Button("English to Chinese")
|
26 |
swap_button = gr.Button("Swap")
|
27 |
+
copy_button = gr.Button("Copy")
|
28 |
|
29 |
zh_to_en_button.click(translate_zh_to_en, inputs=input_text, outputs=output_text)
|
30 |
en_to_zh_button.click(translate_en_to_zh, inputs=input_text, outputs=output_text)
|
31 |
swap_button.click(swap_text, inputs=[input_text, output_text], outputs=[input_text, output_text])
|
32 |
+
copy_button.click(copy_to_clipboard, inputs=[output_text], outputs=[])
|
33 |
+
|
34 |
|
35 |
demo.launch()
|