Skip to content

Commit 67d6247

Browse files
committed
Further reorganize chat UI
1 parent ab12a17 commit 67d6247

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

server.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,7 @@ def create_settings_menus(default_preset):
231231

232232
create_model_and_preset_menus()
233233

234-
with gr.Box():
235-
with gr.Row():
236-
with gr.Column():
237-
shared.gradio['max_new_tokens'] = gr.Slider(minimum=shared.settings['max_new_tokens_min'], maximum=shared.settings['max_new_tokens_max'], step=1, label='max_new_tokens', value=shared.settings['max_new_tokens'])
238-
shared.gradio['chat_prompt_size_slider'] = gr.Slider(minimum=shared.settings['chat_prompt_size_min'], maximum=shared.settings['chat_prompt_size_max'], step=1, label='Maximum prompt size in tokens', value=shared.settings['chat_prompt_size'])
239-
with gr.Column():
240-
shared.gradio['chat_generation_attempts'] = gr.Slider(minimum=shared.settings['chat_generation_attempts_min'], maximum=shared.settings['chat_generation_attempts_max'], value=shared.settings['chat_generation_attempts'], step=1, label='Generation attempts (for longer replies)')
241-
shared.gradio['check'] = gr.Checkbox(value=shared.settings[f'stop_at_newline{suffix}'], label='Stop generating at new line character?')
242-
243-
with gr.Tab("Chat settings", elem_id="chat-settings"):
234+
with gr.Tab("Character", elem_id="chat-settings"):
244235
shared.gradio['name1'] = gr.Textbox(value=shared.settings[f'name1{suffix}'], lines=1, label='Your name')
245236
shared.gradio['name2'] = gr.Textbox(value=shared.settings[f'name2{suffix}'], lines=1, label='Bot\'s name')
246237
shared.gradio['context'] = gr.Textbox(value=shared.settings[f'context{suffix}'], lines=5, label='Context')
@@ -273,6 +264,16 @@ def create_settings_menus(default_preset):
273264
shared.gradio['upload_img_tavern'] = gr.File(type='binary', file_types=['image'])
274265

275266
with gr.Tab("Settings", elem_id="settings"):
267+
with gr.Box():
268+
gr.Markdown("Chat parameters")
269+
with gr.Row():
270+
with gr.Column():
271+
shared.gradio['max_new_tokens'] = gr.Slider(minimum=shared.settings['max_new_tokens_min'], maximum=shared.settings['max_new_tokens_max'], step=1, label='max_new_tokens', value=shared.settings['max_new_tokens'])
272+
shared.gradio['chat_prompt_size_slider'] = gr.Slider(minimum=shared.settings['chat_prompt_size_min'], maximum=shared.settings['chat_prompt_size_max'], step=1, label='Maximum prompt size in tokens', value=shared.settings['chat_prompt_size'])
273+
with gr.Column():
274+
shared.gradio['chat_generation_attempts'] = gr.Slider(minimum=shared.settings['chat_generation_attempts_min'], maximum=shared.settings['chat_generation_attempts_max'], value=shared.settings['chat_generation_attempts'], step=1, label='Generation attempts (for longer replies)')
275+
shared.gradio['check'] = gr.Checkbox(value=shared.settings[f'stop_at_newline{suffix}'], label='Stop generating at new line character?')
276+
276277
create_settings_menus(default_preset)
277278

278279
if shared.args.extensions is not None:

0 commit comments

Comments
 (0)