Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,10 @@ def translate_en_to_zh(text):
|
|
16 |
def swap_text(input_text, output_text):
|
17 |
return output_text, input_text
|
18 |
|
|
|
|
|
|
|
|
|
19 |
with gr.Blocks() as demo:
|
20 |
input_text = gr.Textbox(lines=2, placeholder="Enter text here...", label="Input Text")
|
21 |
output_text = gr.Textbox(lines=2, label="Translated Text")
|
|
|
16 |
def swap_text(input_text, output_text):
|
17 |
return output_text, input_text
|
18 |
|
19 |
+
def copy_to_clipboard(output_text):
|
20 |
+
pyperclip.copy(output_text)
|
21 |
+
return "Text copied!"
|
22 |
+
|
23 |
with gr.Blocks() as demo:
|
24 |
input_text = gr.Textbox(lines=2, placeholder="Enter text here...", label="Input Text")
|
25 |
output_text = gr.Textbox(lines=2, label="Translated Text")
|