mikeee commited on
Commit
9449f24
1 Parent(s): 267f542

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -180,6 +180,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
180
  tr_btn = gr.Button("Go", variant="primary")
181
  out_text = gr.Text()
182
  tr_btn.click(trans_api, [input_text, max_length, top_p, temperature], out_text, show_progress=True, api_name="tr")
 
183
 
184
  # demo.queue().launch(share=False, inbrowser=True)
185
  # demo.queue().launch(share=True, inbrowser=True, debug=True)
 
180
  tr_btn = gr.Button("Go", variant="primary")
181
  out_text = gr.Text()
182
  tr_btn.click(trans_api, [input_text, max_length, top_p, temperature], out_text, show_progress=True, api_name="tr")
183
+ input_text.submit(trans_api, [input_text, max_length, top_p, temperature], out_text, show_progress=True, api_name="tr")
184
 
185
  # demo.queue().launch(share=False, inbrowser=True)
186
  # demo.queue().launch(share=True, inbrowser=True, debug=True)