mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-06 15:13:38 +00:00
UI: Improve the Tools checkbox list style
This commit is contained in:
parent
fdd8e5b1fd
commit
09d5e049d6
3 changed files with 103 additions and 2 deletions
|
|
@ -92,8 +92,9 @@ def create_ui():
|
|||
gr.HTML("<div class='sidebar-vertical-separator'></div>")
|
||||
|
||||
from modules.tool_use import get_available_tools
|
||||
shared.gradio['selected_tools'] = gr.CheckboxGroup(choices=get_available_tools(), value=[], label='Tools', info='Functions the model can call during generation.')
|
||||
ui.create_refresh_button(shared.gradio['selected_tools'], lambda: None, lambda: {'choices': get_available_tools()}, 'refresh-button')
|
||||
shared.gradio['selected_tools'] = gr.CheckboxGroup(choices=get_available_tools(), value=[], label='Tools', info='Functions the model can call during generation.', elem_id='tools-group')
|
||||
shared.gradio['tools_refresh'] = gr.Button('Refresh list', elem_id='tools-refresh-btn', visible=False)
|
||||
shared.gradio['tools_refresh'].click(fn=lambda: gr.update(choices=get_available_tools()), inputs=[], outputs=[shared.gradio['selected_tools']])
|
||||
|
||||
gr.HTML("<div class='sidebar-vertical-separator'></div>")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue