mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 01:09:22 +01:00
UI: remove unused gr.State variable from the Default tab
This commit is contained in:
parent
04cb197ed6
commit
38d58764db
@ -16,7 +16,6 @@ outputs = ('output_textbox', 'html-default')
|
|||||||
def create_ui():
|
def create_ui():
|
||||||
mu = shared.args.multi_user
|
mu = shared.args.multi_user
|
||||||
with gr.Tab('Default', elem_id='default-tab'):
|
with gr.Tab('Default', elem_id='default-tab'):
|
||||||
shared.gradio['last_input-default'] = gr.State('')
|
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
with gr.Column():
|
with gr.Column():
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
@ -63,14 +62,12 @@ def create_ui():
|
|||||||
|
|
||||||
def create_event_handlers():
|
def create_event_handlers():
|
||||||
shared.gradio['Generate-default'].click(
|
shared.gradio['Generate-default'].click(
|
||||||
lambda x: x, gradio('textbox-default'), gradio('last_input-default')).then(
|
|
||||||
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
||||||
generate_reply_wrapper, gradio(inputs), gradio(outputs), show_progress=False).then(
|
generate_reply_wrapper, gradio(inputs), gradio(outputs), show_progress=False).then(
|
||||||
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
||||||
None, None, None, js=f'() => {{{ui.audio_notification_js}}}')
|
None, None, None, js=f'() => {{{ui.audio_notification_js}}}')
|
||||||
|
|
||||||
shared.gradio['textbox-default'].submit(
|
shared.gradio['textbox-default'].submit(
|
||||||
lambda x: x, gradio('textbox-default'), gradio('last_input-default')).then(
|
|
||||||
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
||||||
generate_reply_wrapper, gradio(inputs), gradio(outputs), show_progress=False).then(
|
generate_reply_wrapper, gradio(inputs), gradio(outputs), show_progress=False).then(
|
||||||
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
||||||
|
Loading…
Reference in New Issue
Block a user