diff --git a/modules/html_generator.py b/modules/html_generator.py index 940d548..f8cff6d 100644 --- a/modules/html_generator.py +++ b/modules/html_generator.py @@ -142,22 +142,23 @@ def generate_chat_html(history, name1, name2, character): """ - if not (i == len(history)-1 and len(row[0]) == 0): - output += f""" -
-
- {img_me} -
-
-
- {name1} -
-
- {row[0]} -
-
+ if not row[0]: # don't display empty user messages + continue + output += f""" +
+
+ {img_me} +
+
+
+ {name1}
- """ +
+ {row[0]} +
+
+
+ """ output += "
" return output