From 6e1b16c2aa87d167ed9893e800c199408ba946d3 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 24 Mar 2023 17:18:27 -0300 Subject: [PATCH] Update html_generator.py --- modules/html_generator.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/html_generator.py b/modules/html_generator.py index f8cff6d8..ff18c913 100644 --- a/modules/html_generator.py +++ b/modules/html_generator.py @@ -119,13 +119,13 @@ def load_html_image(paths): def generate_chat_html(history, name1, name2, character): output = f'
' - + img_bot = load_html_image([f"characters/{character}.{ext}" for ext in ['png', 'jpg', 'jpeg']] + ["img_bot.png","img_bot.jpg","img_bot.jpeg"]) img_me = load_html_image(["img_me.png", "img_me.jpg", "img_me.jpeg"]) for i,_row in enumerate(history[::-1]): row = [convert_to_markdown(entry) for entry in _row] - + output += f"""
@@ -142,8 +142,9 @@ def generate_chat_html(history, name1, name2, character):
""" - if not row[0]: # don't display empty user messages + if len(row[0]) == 0: # don't display empty user messages continue + output += f"""