Submit with Shift+Enter
This commit is contained in:
parent
e2a917b3bf
commit
6cbfe19c23
1 changed files with 2 additions and 0 deletions
|
@ -166,6 +166,7 @@ if args.notebook:
|
||||||
model_menu = gr.Dropdown(choices=available_models, value=model_name, label='Model')
|
model_menu = gr.Dropdown(choices=available_models, value=model_name, label='Model')
|
||||||
|
|
||||||
btn.click(generate_reply, [textbox, temp_slider, length_slider, preset_menu, model_menu], [textbox, markdown, html], show_progress=True)
|
btn.click(generate_reply, [textbox, temp_slider, length_slider, preset_menu, model_menu], [textbox, markdown, html], show_progress=True)
|
||||||
|
textbox.submit(generate_reply, [textbox, temp_slider, length_slider, preset_menu, model_menu], [textbox, markdown, html], show_progress=True)
|
||||||
elif args.chat:
|
elif args.chat:
|
||||||
history = []
|
history = []
|
||||||
|
|
||||||
|
@ -234,5 +235,6 @@ else:
|
||||||
html = gr.HTML()
|
html = gr.HTML()
|
||||||
|
|
||||||
btn.click(generate_reply, [textbox, temp_slider, length_slider, preset_menu, model_menu], [output_textbox, markdown, html], show_progress=True)
|
btn.click(generate_reply, [textbox, temp_slider, length_slider, preset_menu, model_menu], [output_textbox, markdown, html], show_progress=True)
|
||||||
|
textbox.submit(generate_reply, [textbox, temp_slider, length_slider, preset_menu, model_menu], [output_textbox, markdown, html], show_progress=True)
|
||||||
|
|
||||||
interface.launch(share=False, server_name="0.0.0.0")
|
interface.launch(share=False, server_name="0.0.0.0")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue