shao-shuai commited on
Commit Β·
281ffc8
1
Parent(s): abd8f8e
revert back
Browse files
app.py
CHANGED
|
@@ -47,17 +47,17 @@ def translate(text_cn):
|
|
| 47 |
|
| 48 |
return response
|
| 49 |
|
| 50 |
-
|
| 51 |
# Define the Gradio interface
|
| 52 |
-
with gr.Blocks() as iface:
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
|
| 63 |
iface.launch(auth=("robosense", "F.T5h4z$tonf"))
|
|
|
|
| 47 |
|
| 48 |
return response
|
| 49 |
|
| 50 |
+
iface = gr.Interface(fn=translate, inputs="text", outputs="text", title="π Patent Translate Bot", description="A simple bot for patent translation")
|
| 51 |
# Define the Gradio interface
|
| 52 |
+
# with gr.Blocks() as iface:
|
| 53 |
+
# gr.Markdown("π Patent Translate Bot\nA simple bot for patent translation")
|
| 54 |
+
# with gr.Row():
|
| 55 |
+
# input_text = gr.Textbox(label="Enter Chinese text")
|
| 56 |
+
# translate_button = gr.Button("Translate")
|
| 57 |
+
# reset_button = gr.Button("Reset Context")
|
| 58 |
+
# output_text = gr.Textbox(label="Translation")
|
| 59 |
+
|
| 60 |
+
# translate_button.click(fn=translate, inputs=input_text, outputs=output_text)
|
| 61 |
+
# reset_button.click(fn=reset_context, inputs=None, outputs=output_text)
|
| 62 |
|
| 63 |
iface.launch(auth=("robosense", "F.T5h4z$tonf"))
|