zamroni111 commited on
Commit
eb08877
·
verified ·
1 Parent(s): d1909f9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -26,9 +26,10 @@ Output is reformatted that each sentence starts at new line to improve readabili
26
  <pre>
27
  ...
28
  vNewDecoded = tokenizer_stream.decode(new_token)
29
- if re.findall("^[\x2E\x3A\x3B]$", vPreviousDecoded) and vNewDecoded.startswith(" ") and (not vNewDecoded.startswith(" *")) :
30
- vNewDecoded = "\n" + vNewDecoded.replace(" ", "", 1)
31
- print(vNewDecoded, end='', flush=True)
 
32
  vPreviousDecoded = vNewDecoded
33
  ...
34
  </pre>
 
26
  <pre>
27
  ...
28
  vNewDecoded = tokenizer_stream.decode(new_token)
29
+ if re.fullmatch("^[\x2E\x3A\x3B]$", vPreviousDecoded) and vNewDecoded.startswith(" ") and (not vNewDecoded.startswith(" *")) :
30
+ print("\n" + vNewDecoded.replace(" ", "", 1), end='', flush=True)
31
+ else :
32
+ print(vNewDecoded, end='', flush=True)
33
  vPreviousDecoded = vNewDecoded
34
  ...
35
  </pre>