mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
More style fixes
This commit is contained in:
parent
6f213b8c14
commit
3746d72853
@ -9,8 +9,24 @@ import re
|
||||
from pathlib import Path
|
||||
|
||||
def generate_basic_html(s):
|
||||
s = '\n'.join([f'<p style="margin-bottom: 22px">{line}</p>' for line in s.split('\n')])
|
||||
s = f'<div style="max-width: 600px; margin-left: auto; margin-right: auto; background-color:#efefef; color:#0b0f19; padding:3em; font-size:1.1em; font-family: helvetica; line-height: 1.428571429">{s}</div>'
|
||||
css = """
|
||||
.container {
|
||||
max-width: 600px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
background-color: #D9D9D9;
|
||||
padding:3em;
|
||||
}
|
||||
.container p {
|
||||
font-size: 14px !important;
|
||||
color: black !important;
|
||||
font-family: helvetica !important;
|
||||
line-height: 1.428571429 !important;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
"""
|
||||
s = '\n'.join([f'<p>{line}</p>' for line in s.split('\n')])
|
||||
s = f'<style>{css}</style><div class="container">{s}</div>'
|
||||
return s
|
||||
|
||||
def process_post(post, c):
|
||||
|
@ -859,7 +859,7 @@ elif re.match('(rosey|chip|joi)_.*_instruct.*', model_name.lower()) is not None:
|
||||
else:
|
||||
default_text = settings['prompt']
|
||||
description = f"\n\n# Text generation lab\nGenerate text using Large Language Models.\n"
|
||||
css = ".my-4 {margin-top: 0} .py-6 {padding-top: 2.5rem} #refresh-button {flex: none; margin: 0; padding: 0; min-width: 50px; border: none; box-shadow: none; border-radius: 0} #download-label, #upload-label {min-height: 0}"
|
||||
css = ".tabs.svelte-710i53 {margin-top: 0} .py-6 {padding-top: 2.5rem} #refresh-button {flex: none; margin: 0; padding: 0; min-width: 50px; border: none; box-shadow: none; border-radius: 0} #download-label, #upload-label {min-height: 0}"
|
||||
chat_css = ".h-\[40vh\] {height: 66.67vh} .gradio-container {max-width: 800px; margin-left: auto; margin-right: auto} .w-screen {width: unset} div.svelte-362y77>*, div.svelte-362y77>.form>* {flex-wrap: nowrap}"
|
||||
|
||||
suffix = '_pygmalion' if 'pygmalion' in model_name.lower() else ''
|
||||
|
Loading…
Reference in New Issue
Block a user