From 38d58764dbd249c7be00fa6468fb31a1d24c25a6 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:17:44 -0700 Subject: [PATCH] UI: remove unused gr.State variable from the Default tab --- modules/ui_default.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/ui_default.py b/modules/ui_default.py index bf9800f6..e3bfe784 100644 --- a/modules/ui_default.py +++ b/modules/ui_default.py @@ -16,7 +16,6 @@ outputs = ('output_textbox', 'html-default') def create_ui(): mu = shared.args.multi_user with gr.Tab('Default', elem_id='default-tab'): - shared.gradio['last_input-default'] = gr.State('') with gr.Row(): with gr.Column(): with gr.Row(): @@ -63,14 +62,12 @@ def create_ui(): def create_event_handlers(): 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( generate_reply_wrapper, gradio(inputs), gradio(outputs), show_progress=False).then( ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then( None, None, None, js=f'() => {{{ui.audio_notification_js}}}') 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( generate_reply_wrapper, gradio(inputs), gradio(outputs), show_progress=False).then( ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(