Skip to content

Commit

Permalink
Merge branch 'oobabooga:main' into stt-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasVincent authored Mar 9, 2023
2 parents 00359ba + 3341447 commit d5efc06
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ For these two, please try commenting on an existing issue instead of creating a

## Credits

- Gradio dropdown menu refresh button: https://github.com/AUTOMATIC1111/stable-diffusion-webui
- Verbose preset: Anonymous 4chan user.
- NovelAI and KoboldAI presets: https://github.com/KoboldAI/KoboldAI-Client/wiki/Settings-Presets
- Pygmalion preset, code for early stopping in chat mode, code for some of the sliders, --chat mode colors: https://github.com/PygmalionAI/gradio-ui/
- Verbose preset: Anonymous 4chan user.
- Instruct-Joi preset: https://huggingface.co/Rallio67/joi_12B_instruct_alpha
- Gradio dropdown menu refresh button: https://github.com/AUTOMATIC1111/stable-diffusion-webui
3 changes: 3 additions & 0 deletions presets/Contrastive Search.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
do_sample=False
penalty_alpha=0.6
top_k=4
5 changes: 0 additions & 5 deletions presets/Instruct Joi (Contrastive Search).txt

This file was deleted.

7 changes: 4 additions & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,12 @@ def create_settings_menus(default_preset):
gen_events = []
default_preset = shared.settings['presets'][next((k for k in shared.settings['presets'] if re.match(k.lower(), shared.model_name.lower())), 'default')]
default_text = shared.settings['prompts'][next((k for k in shared.settings['prompts'] if re.match(k.lower(), shared.model_name.lower())), 'default')]
title ='Text generation web UI'
description = '\n\n# Text generation lab\nGenerate text using Large Language Models.\n'
suffix = '_pygmalion' if 'pygmalion' in shared.model_name.lower() else ''

if shared.args.chat or shared.args.cai_chat:
with gr.Blocks(css=ui.css+ui.chat_css, analytics_enabled=False) as shared.gradio['interface']:
with gr.Blocks(css=ui.css+ui.chat_css, analytics_enabled=False, title=title) as shared.gradio['interface']:
if shared.args.cai_chat:
shared.gradio['display'] = gr.HTML(value=generate_chat_html(shared.history['visible'], shared.settings[f'name1{suffix}'], shared.settings[f'name2{suffix}'], shared.character))
else:
Expand Down Expand Up @@ -313,7 +314,7 @@ def create_settings_menus(default_preset):
shared.gradio['interface'].load(reload_func, reload_inputs, [shared.gradio['display']], show_progress=True)

elif shared.args.notebook:
with gr.Blocks(css=ui.css, analytics_enabled=False) as shared.gradio['interface']:
with gr.Blocks(css=ui.css, analytics_enabled=False, title=title) as shared.gradio['interface']:
gr.Markdown(description)
with gr.Tab('Raw'):
shared.gradio['textbox'] = gr.Textbox(value=default_text, lines=23)
Expand All @@ -337,7 +338,7 @@ def create_settings_menus(default_preset):
shared.gradio['Stop'].click(None, None, None, cancels=gen_events)

else:
with gr.Blocks(css=ui.css, analytics_enabled=False) as shared.gradio['interface']:
with gr.Blocks(css=ui.css, analytics_enabled=False, title=title) as shared.gradio['interface']:
gr.Markdown(description)
with gr.Row():
with gr.Column():
Expand Down

0 comments on commit d5efc06

Please sign in to comment.