Make "Show controls" customizable through settings.yaml

This commit is contained in:
oobabooga 2023-08-16 07:03:53 -07:00
parent 2a29208224
commit 73d9befb65
7 changed files with 10 additions and 7 deletions

View file

@ -128,6 +128,7 @@ def create_interface():
shared.gradio['interface'].load(lambda: None, None, None, _js="() => document.getElementsByTagName('body')[0].classList.add('dark')")
shared.gradio['interface'].load(lambda: None, None, None, _js=f"() => {{{js}}}")
shared.gradio['interface'].load(None, gradio('show_controls'), None, _js=f'(x) => {{{ui.show_controls_js}; toggle_controls(x)}}')
shared.gradio['interface'].load(partial(ui.apply_interface_values, {}, use_persistent=True), None, gradio(ui.list_interface_input_elements()), show_progress=False)
shared.gradio['interface'].load(chat.redraw_html, gradio(ui_chat.reload_arr), gradio('display'))