Change the chat generate button

This commit is contained in:
oobabooga 2023-09-14 05:16:44 -07:00
parent ecc90f9f62
commit 644a9b8765
3 changed files with 8 additions and 2 deletions

View File

@ -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;
}

View File

@ -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';

View File

@ -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')