Some minor formatting changes
This commit is contained in:
parent
3e6a8ccdce
commit
d58544a420
2 changed files with 6 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue