mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-09-07 18:12:56 +00:00
UI: fix the default character not loading correctly on startup
This commit is contained in:
parent
e6181e834a
commit
1815877061
@ -84,7 +84,7 @@ def create_ui():
|
||||
shared.gradio['start_with'] = gr.Textbox(label='Start reply with', placeholder='Sure thing!', value=shared.settings['start_with'], elem_classes=['add_scrollbar'])
|
||||
|
||||
with gr.Row():
|
||||
shared.gradio['mode'] = gr.Radio(choices=['chat', 'chat-instruct', 'instruct'], label='Mode', info='Defines how the chat prompt is generated. In instruct and chat-instruct modes, the instruction template Parameters > Instruction template is used.', elem_id='chat-mode')
|
||||
shared.gradio['mode'] = gr.Radio(choices=['chat', 'chat-instruct', 'instruct'], value=shared.settings['mode'] if shared.settings['mode'] in ['chat', 'chat-instruct'] else None, label='Mode', info='Defines how the chat prompt is generated. In instruct and chat-instruct modes, the instruction template Parameters > Instruction template is used.', elem_id='chat-mode')
|
||||
|
||||
with gr.Row():
|
||||
shared.gradio['chat_style'] = gr.Dropdown(choices=utils.get_available_chat_styles(), label='Chat style', value=shared.settings['chat_style'], visible=shared.settings['mode'] != 'instruct')
|
||||
|
@ -90,7 +90,7 @@ def create_interface():
|
||||
# Force some events to be triggered on page load
|
||||
shared.persistent_interface_state.update({
|
||||
'loader': shared.args.loader or 'Transformers',
|
||||
'mode': shared.settings['mode'],
|
||||
'mode': shared.settings['mode'] if shared.settings['mode'] == 'instruct' else gr.update(),
|
||||
'character_menu': shared.args.character or shared.settings['character'],
|
||||
'instruction_template_str': shared.settings['instruction_template_str'],
|
||||
'prompt_menu-default': shared.settings['prompt-default'],
|
||||
|
Loading…
Reference in New Issue
Block a user