From caaa5561593d645bf1676eca9db57df073aeada1 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 24 Apr 2023 03:30:35 -0300 Subject: [PATCH] Move extensions block definition to the bottom --- server.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server.py b/server.py index 8308c9b..da78634 100644 --- a/server.py +++ b/server.py @@ -711,10 +711,6 @@ def create_interface(): set_interface_arguments, [shared.gradio[k] for k in ['interface_modes_menu', 'extensions_menu', 'bool_menu']], None).then( lambda: None, None, None, _js='() => {document.body.innerHTML=\'

Reloading...

\'; setTimeout(function(){location.reload()},2500); return []}') - # Extensions block - if shared.args.extensions is not None: - extensions_module.create_extensions_block() - # chat mode event handlers if shared.is_chat(): shared.input_params = [shared.gradio[k] for k in ['Chat input', 'interface_state']] @@ -848,6 +844,9 @@ def create_interface(): shared.gradio['interface'].load(None, None, None, _js=f"() => {{{ui.main_js}}}") shared.gradio['interface'].load(partial(ui.apply_interface_values, {}, use_persistent=True), None, [shared.gradio[k] for k in ui.list_interface_input_elements(chat=shared.is_chat())], show_progress=False) + # Extensions block + if shared.args.extensions is not None: + extensions_module.create_extensions_block() # Launch the interface shared.gradio['interface'].queue()