소스 검색

Improve pygmalion line breaks

oobabooga 3 년 전
부모
커밋
9a7f187b5a
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      server.py
  2. BIN
      webui.png

+ 2 - 1
server.py

@@ -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