Improve pygmalion line breaks

This commit is contained in:
oobabooga 2023-01-14 23:26:14 -03:00
parent 830ec7123a
commit 9a7f187b5a
2 changed files with 2 additions and 1 deletions

View File

@ -201,10 +201,11 @@ elif args.chat:
reply = reply[len(question):].split('\n')[0].strip()
else:
reply = generate_reply(question, tokens, inference_settings, selected_model)[0]
reply = reply[len(question):].strip()
reply = reply[len(question):]
idx = reply.find(f"\n{name1}:")
if idx != -1:
reply = reply[:idx]
reply = reply.replace('\n', '\n\n').strip()
history.append((text, reply))
return history

BIN
webui.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB