winglian commited on
Commit
178e1da
·
1 Parent(s): 8b46088

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -53,7 +53,7 @@ def chat(history, system_message, max_tokens, temperature, top_p, top_k, repetit
53
  repetition_penalty=repetition_penalty,
54
  )
55
  for tokens in prediction:
56
- tokens = re.findall(r'\s*\S+\s*', tokens)
57
  for s in tokens:
58
  answer = s
59
  history[-1][1] += answer
 
53
  repetition_penalty=repetition_penalty,
54
  )
55
  for tokens in prediction:
56
+ tokens = re.findall(r'(.*?)(\s|$)', tokens)
57
  for s in tokens:
58
  answer = s
59
  history[-1][1] += answer