Improve the style of the Character and User tabs

This commit is contained in:
oobabooga 2025-06-16 06:12:37 -07:00
parent 949b7ec9cf
commit f77f1504f5
2 changed files with 15 additions and 3 deletions

View file

@ -1645,3 +1645,15 @@ button:focus {
justify-content: center;
display: none;
}
#character-context textarea {
height: calc((100vh - 400px) * 2/3) !important;
}
#character-greeting textarea {
height: calc((100vh - 400px) * 1/3) !important;
}
#user-description textarea {
height: calc(100vh - 281px) !important;
}

View file

@ -125,12 +125,12 @@ def create_chat_settings_ui():
shared.gradio['restore_character'] = gr.Button('Restore character', elem_classes='refresh-button', interactive=True, elem_id='restore-character')
shared.gradio['name2'] = gr.Textbox(value=shared.settings['name2'], lines=1, label='Character\'s name')
shared.gradio['context'] = gr.Textbox(value=shared.settings['context'], lines=10, label='Context', elem_classes=['add_scrollbar'])
shared.gradio['greeting'] = gr.Textbox(value=shared.settings['greeting'], lines=5, label='Greeting', elem_classes=['add_scrollbar'])
shared.gradio['context'] = gr.Textbox(value=shared.settings['context'], lines=10, label='Context', elem_classes=['add_scrollbar'], elem_id="character-context")
shared.gradio['greeting'] = gr.Textbox(value=shared.settings['greeting'], lines=5, label='Greeting', elem_classes=['add_scrollbar'], elem_id="character-greeting")
with gr.Tab("User"):
shared.gradio['name1'] = gr.Textbox(value=shared.settings['name1'], lines=1, label='Name')
shared.gradio['user_bio'] = gr.Textbox(value=shared.settings['user_bio'], lines=10, label='Description', info='Here you can optionally write a description of yourself.', placeholder='{{user}}\'s personality: ...', elem_classes=['add_scrollbar'])
shared.gradio['user_bio'] = gr.Textbox(value=shared.settings['user_bio'], lines=10, label='Description', info='Here you can optionally write a description of yourself.', placeholder='{{user}}\'s personality: ...', elem_classes=['add_scrollbar'], elem_id="user-description")
with gr.Tab('Chat history'):
with gr.Row():