From 644a9b87659bd487abd9c0b1be6815ac9ebf907d Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 14 Sep 2023 05:16:44 -0700 Subject: [PATCH] Change the chat generate button --- css/main.css | 4 ++++ js/main.js | 2 ++ modules/ui_chat.py | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/css/main.css b/css/main.css index 101df9f8..256d56c2 100644 --- a/css/main.css +++ b/css/main.css @@ -285,6 +285,10 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { width: 100%; } +#chat-tab button#Generate, #chat-tab button#stop { + width: 89.3438px !important; +} + #chat-tab button, #notebook-tab button, #default-tab button { min-width: 0 !important; } diff --git a/js/main.js b/js/main.js index 4c09fce6..6440226e 100644 --- a/js/main.js +++ b/js/main.js @@ -226,6 +226,8 @@ document.getElementById('stop').parentElement.parentElement.style.flexDirection document.getElementById('stop').parentElement.parentElement.style.paddingBottom = '3px'; document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = '20px'; +document.getElementById('stop').parentElement.parentElement.style.flex = '0 0 auto'; + document.getElementById('gr-hover').parentElement.style.minWidth = 0; document.getElementById('gr-hover').parentElement.style.display = 'flex'; document.getElementById('gr-hover').parentElement.style.flexDirection = 'column-reverse'; diff --git a/modules/ui_chat.py b/modules/ui_chat.py index 5c7933eb..267c4545 100644 --- a/modules/ui_chat.py +++ b/modules/ui_chat.py @@ -36,8 +36,8 @@ def create_ui(): with gr.Column(scale=1): with gr.Row(): - shared.gradio['Stop'] = gr.Button('■', elem_id='stop', visible=False) - shared.gradio['Generate'] = gr.Button('▶', elem_id='Generate', variant='primary') + shared.gradio['Stop'] = gr.Button('Stop', elem_id='stop', visible=False) + shared.gradio['Generate'] = gr.Button('Generate', elem_id='Generate', variant='primary') # Hover menu buttons shared.gradio['Regenerate'] = gr.Button('Regenerate (Ctrl + Enter)', elem_id='Regenerate')