mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Change notebook mode appearance
This commit is contained in:
parent
9ff6a538b6
commit
1c77fdca4c
@ -23,3 +23,9 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
|
|||||||
.pending.svelte-1ed2p3z {
|
.pending.svelte-1ed2p3z {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#extensions {
|
||||||
|
padding: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
10
css/main.css
10
css/main.css
@ -54,3 +54,13 @@ ol li p, ul li p {
|
|||||||
.gradio-container-3-18-0 .prose * h1, h2, h3, h4 {
|
.gradio-container-3-18-0 .prose * h1, h2, h3, h4 {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gradio-container {
|
||||||
|
max-width: 100% !important;
|
||||||
|
padding-top: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#extensions {
|
||||||
|
padding: 15px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
@ -11,7 +11,7 @@ let extensions = document.getElementById('extensions');
|
|||||||
main_parent.addEventListener('click', function(e) {
|
main_parent.addEventListener('click', function(e) {
|
||||||
// Check if the main element is visible
|
// Check if the main element is visible
|
||||||
if (main.offsetHeight > 0 && main.offsetWidth > 0) {
|
if (main.offsetHeight > 0 && main.offsetWidth > 0) {
|
||||||
extensions.style.display = 'block';
|
extensions.style.display = 'flex';
|
||||||
} else {
|
} else {
|
||||||
extensions.style.display = 'none';
|
extensions.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
@ -63,8 +63,8 @@ def create_extensions_block():
|
|||||||
|
|
||||||
# Creating the extension ui elements
|
# Creating the extension ui elements
|
||||||
if should_display_ui:
|
if should_display_ui:
|
||||||
with gr.Box(elem_id="extensions"):
|
with gr.Column(elem_id="extensions"):
|
||||||
gr.Markdown("Extensions")
|
|
||||||
for extension, name in iterator():
|
for extension, name in iterator():
|
||||||
|
gr.Markdown(f"\n### {name}")
|
||||||
if hasattr(extension, "ui"):
|
if hasattr(extension, "ui"):
|
||||||
extension.ui()
|
extension.ui()
|
||||||
|
25
server.py
25
server.py
@ -369,19 +369,22 @@ def create_interface():
|
|||||||
|
|
||||||
elif shared.args.notebook:
|
elif shared.args.notebook:
|
||||||
with gr.Tab("Text generation", elem_id="main"):
|
with gr.Tab("Text generation", elem_id="main"):
|
||||||
with gr.Tab('Raw'):
|
|
||||||
shared.gradio['textbox'] = gr.Textbox(value=default_text, lines=25)
|
|
||||||
with gr.Tab('Markdown'):
|
|
||||||
shared.gradio['markdown'] = gr.Markdown()
|
|
||||||
with gr.Tab('HTML'):
|
|
||||||
shared.gradio['html'] = gr.HTML()
|
|
||||||
|
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
shared.gradio['Stop'] = gr.Button('Stop')
|
with gr.Column(scale=4):
|
||||||
shared.gradio['Generate'] = gr.Button('Generate')
|
with gr.Tab('Raw'):
|
||||||
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'])
|
shared.gradio['textbox'] = gr.Textbox(value=default_text, elem_id="textbox", lines=25)
|
||||||
|
with gr.Tab('Markdown'):
|
||||||
|
shared.gradio['markdown'] = gr.Markdown()
|
||||||
|
with gr.Tab('HTML'):
|
||||||
|
shared.gradio['html'] = gr.HTML()
|
||||||
|
|
||||||
create_model_and_preset_menus()
|
with gr.Row():
|
||||||
|
shared.gradio['Stop'] = gr.Button('Stop')
|
||||||
|
shared.gradio['Generate'] = gr.Button('Generate')
|
||||||
|
with gr.Column(scale=1):
|
||||||
|
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'])
|
||||||
|
|
||||||
|
create_model_and_preset_menus()
|
||||||
with gr.Tab("Parameters", elem_id="parameters"):
|
with gr.Tab("Parameters", elem_id="parameters"):
|
||||||
create_settings_menus(default_preset)
|
create_settings_menus(default_preset)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user