Make the gallery interactive to load characters

This commit is contained in:
oobabooga 2023-02-26 17:19:36 -03:00
parent 8e3e8a070f
commit 7a776ccf87
2 changed files with 7 additions and 3 deletions

View file

@ -207,7 +207,7 @@ if shared.args.chat or shared.args.cai_chat:
shared.gradio['name2'] = gr.Textbox(value=shared.settings[f'name2{suffix}'], lines=1, label='Bot\'s name')
shared.gradio['context'] = gr.Textbox(value=shared.settings[f'context{suffix}'], lines=2, label='Context')
with gr.Row():
shared.gradio['character_menu'] = gr.Dropdown(choices=available_characters, value='None', label='Character')
shared.gradio['character_menu'] = gr.Dropdown(choices=available_characters, value='None', label='Character', elem_id='character-menu')
ui.create_refresh_button(shared.gradio['character_menu'], lambda : None, lambda : {'choices': get_available_characters()}, 'refresh-button')
with gr.Row():