Add "save defaults to settings.yaml" button (#3574)

This commit is contained in:
oobabooga 2023-08-14 11:46:07 -03:00 committed by GitHub
parent a95e6f02cb
commit 619cb4e78b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 82 additions and 52 deletions

View file

@ -13,13 +13,11 @@ outputs = ('output_textbox', 'html-default')
def create_ui():
default_text = load_prompt(shared.settings['prompt'])
with gr.Tab('Default', elem_id='default-tab'):
shared.gradio['last_input-default'] = gr.State('')
with gr.Row():
with gr.Column():
shared.gradio['textbox-default'] = gr.Textbox(value=default_text, elem_classes=['textbox_default', 'add_scrollbar'], lines=27, label='Input')
shared.gradio['textbox-default'] = gr.Textbox(value='', elem_classes=['textbox_default', 'add_scrollbar'], lines=27, label='Input')
with gr.Row():
shared.gradio['Generate-default'] = gr.Button('Generate', variant='primary')
shared.gradio['Stop-default'] = gr.Button('Stop', elem_id='stop')