Improve "Interface mode" appearance

This commit is contained in:
oobabooga 2023-06-11 15:29:45 -03:00
parent a06c953692
commit 8e73806b20
2 changed files with 16 additions and 2 deletions

View File

@ -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;
}

View File

@ -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