mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-25 13:58:56 +01:00
Some minor formatting changes
This commit is contained in:
parent
3e6a8ccdce
commit
d58544a420
@ -86,10 +86,10 @@ def generate_4chan_html(f):
|
||||
margin-top: 4px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
padding-bottom: 2px;
|
||||
padding-bottom: 4px;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
padding-top: 2px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
#parent #container .number {
|
||||
@ -97,6 +97,7 @@ def generate_4chan_html(f):
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-size: 13.3333px;
|
||||
width: 342.65px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
#parent #container .op {
|
||||
|
@ -250,6 +250,8 @@ def fix_galactica(s):
|
||||
s = s.replace(r'\(', r'$')
|
||||
s = s.replace(r'\)', r'$')
|
||||
s = s.replace(r'$$', r'$')
|
||||
s = re.sub(r'\n', r'\n\n', s)
|
||||
s = re.sub(r"\n{3,}", "\n\n", s)
|
||||
return s
|
||||
|
||||
def get_max_prompt_length(tokens):
|
||||
@ -755,7 +757,7 @@ def save_history(timestamp=True):
|
||||
if not Path('logs').exists():
|
||||
Path('logs').mkdir()
|
||||
with open(Path(f'logs/{fname}'), 'w') as f:
|
||||
f.write(json.dumps({'data': history['internal'], 'data_visible': history['visible']}))
|
||||
f.write(json.dumps({'data': history['internal'], 'data_visible': history['visible']}, indent=2))
|
||||
return Path(f'logs/{fname}')
|
||||
|
||||
def load_history(file, name1, name2):
|
||||
|
Loading…
Reference in New Issue
Block a user