Spaces:
Runtime error
Runtime error
again, remove the <br> tags
Browse files
app.py
CHANGED
@@ -144,9 +144,9 @@ def clean_chat_response(chat: List[Tuple[str, str]]) -> List[Tuple[str, str]]:
|
|
144 |
''' Not perfect, but much better at removing all the crazy newlines. '''
|
145 |
cleaned_chat = []
|
146 |
for human_chat, bot_chat in chat:
|
147 |
-
|
148 |
human_chat = human_chat.replace("\n\n", "\n")
|
149 |
-
|
150 |
bot_chat = bot_chat.replace("\n\n", "\n")
|
151 |
cleaned_chat.append( (human_chat, bot_chat) )
|
152 |
return cleaned_chat
|
|
|
144 |
''' Not perfect, but much better at removing all the crazy newlines. '''
|
145 |
cleaned_chat = []
|
146 |
for human_chat, bot_chat in chat:
|
147 |
+
human_chat = human_chat.replace("<br>", "")
|
148 |
human_chat = human_chat.replace("\n\n", "\n")
|
149 |
+
bot_chat = bot_chat.replace("<br>", "")
|
150 |
bot_chat = bot_chat.replace("\n\n", "\n")
|
151 |
cleaned_chat.append( (human_chat, bot_chat) )
|
152 |
return cleaned_chat
|