diff --git a/modules/html_generator.py b/modules/html_generator.py
index 77bd3107..e2edc11d 100644
--- a/modules/html_generator.py
+++ b/modules/html_generator.py
@@ -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 {
diff --git a/server.py b/server.py
index 7f4be43e..d19da85f 100644
--- a/server.py
+++ b/server.py
@@ -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):