shao-shuai commited on
Commit
281ffc8
Β·
1 Parent(s): abd8f8e

revert back

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -47,17 +47,17 @@ def translate(text_cn):
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"))
 
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"))