From 2cb07065ec6aa7064e8ce82b11572c6086f749f0 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sun, 20 Aug 2023 21:50:42 -0700 Subject: [PATCH] Fix an escaping bug --- modules/text_generation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/text_generation.py b/modules/text_generation.py index efafd67a..5128e503 100644 --- a/modules/text_generation.py +++ b/modules/text_generation.py @@ -152,9 +152,9 @@ def generate_reply_wrapper(question, state, stopping_strings=None): def formatted_outputs(reply, model_name): if any(s in model_name for s in ['gpt-4chan', 'gpt4chan']): reply = fix_gpt4chan(reply) - return reply, generate_4chan_html(reply) + return html.unescape(reply), generate_4chan_html(reply) else: - return reply, generate_basic_html(reply) + return html.unescape(reply), generate_basic_html(reply) def fix_gpt4chan(s):