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,14 +13,12 @@ outputs = ('textbox-notebook', 'html-notebook')
def create_ui():
default_text = load_prompt(shared.settings['prompt'])
with gr.Tab('Notebook', elem_id='notebook-tab'):
shared.gradio['last_input-notebook'] = gr.State('')
with gr.Row():
with gr.Column(scale=4):
with gr.Tab('Raw'):
shared.gradio['textbox-notebook'] = gr.Textbox(value=default_text, elem_classes=['textbox', 'add_scrollbar'], lines=27)
shared.gradio['textbox-notebook'] = gr.Textbox(value='', elem_classes=['textbox', 'add_scrollbar'], lines=27)
with gr.Tab('Markdown'):
shared.gradio['markdown_render-notebook'] = gr.Button('Render')