From 8e73806b20c220f15543a16409227189729b30cd Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sun, 11 Jun 2023 15:29:45 -0300 Subject: [PATCH] Improve "Interface mode" appearance --- css/main.css | 10 ++++++++++ server.py | 8 ++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/css/main.css b/css/main.css index b1cfc05..cdb4e2f 100644 --- a/css/main.css +++ b/css/main.css @@ -138,4 +138,14 @@ button { .dark .file-saver { border: 2px solid white !important; +} + +.checkboxgroup-table label { + background: none !important; + padding: 0 !important; + border: 0 !important; +} + +.checkboxgroup-table div { + display: grid !important; } \ No newline at end of file diff --git a/server.py b/server.py index 3db4906..fec59cd 100644 --- a/server.py +++ b/server.py @@ -830,8 +830,12 @@ def create_interface(): shared.gradio['interface_modes_menu'] = gr.Dropdown(choices=modes, value=current_mode, label="Mode") shared.gradio['toggle_dark_mode'] = gr.Button('Toggle dark/light mode', elem_classes="small-button") - shared.gradio['extensions_menu'] = gr.CheckboxGroup(choices=utils.get_available_extensions(), value=shared.args.extensions, label="Available extensions", info='Note that some of these extensions may require manually installing Python requirements through the command: pip install -r extensions/extension_name/requirements.txt') - shared.gradio['bool_menu'] = gr.CheckboxGroup(choices=bool_list, value=bool_active, label="Boolean command-line flags") + with gr.Row(): + with gr.Column(): + shared.gradio['extensions_menu'] = gr.CheckboxGroup(choices=utils.get_available_extensions(), value=shared.args.extensions, label="Available extensions", info='Note that some of these extensions may require manually installing Python requirements through the command: pip install -r extensions/extension_name/requirements.txt', elem_classes='checkboxgroup-table') + with gr.Column(): + shared.gradio['bool_menu'] = gr.CheckboxGroup(choices=bool_list, value=bool_active, label="Boolean command-line flags", elem_classes='checkboxgroup-table') + shared.gradio['reset_interface'] = gr.Button("Apply and restart the interface") # Reset interface event