zamroni111 commited on
Commit
e7a9f32
·
verified ·
1 Parent(s): 7e6f959

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -15,9 +15,10 @@ Output is reformatted that each sentence starts at new line to improve readabili
15
  <pre>
16
  ...
17
  vNewDecoded = tokenizer_stream.decode(new_token)
18
- if re.findall("^[\x2E\x3A\x3B]$", vPreviousDecoded) and vNewDecoded.startswith(" ") and (not vNewDecoded.startswith(" *")) :
19
- vNewDecoded = "\n" + vNewDecoded.replace(" ", "", 1)
20
- print(vNewDecoded, end='', flush=True)
 
21
  vPreviousDecoded = vNewDecoded
22
  ...
23
  </pre>
 
15
  <pre>
16
  ...
17
  vNewDecoded = tokenizer_stream.decode(new_token)
18
+ if re.fullmatch("^[\x2E\x3A\x3B]$", vPreviousDecoded) and vNewDecoded.startswith(" ") and (not vNewDecoded.startswith(" *")) :
19
+ print("\n" + vNewDecoded.replace(" ", "", 1), end='', flush=True)
20
+ else :
21
+ print(vNewDecoded, end='', flush=True)
22
  vPreviousDecoded = vNewDecoded
23
  ...
24
  </pre>