Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|