Update generate.py

This commit is contained in:
Duzeyao
2019-10-24 09:25:16 +08:00
parent 2ffcc14a08
commit 4e56c1b3b6

View File

@@ -198,7 +198,9 @@ def main():
for i, item in enumerate(text): for i, item in enumerate(text):
if item == '[MASK]': if item == '[MASK]':
text[i] = '' text[i] = ''
if item == '[CLS]' or item == '[SEP]': elif item == '[CLS]':
text[i] = '\n\n'
elif item == '[SEP]':
text[i] = '\n' text[i] = '\n'
info = "=" * 40 + " SAMPLE " + str(generated) + " " + "=" * 40 + "\n" info = "=" * 40 + " SAMPLE " + str(generated) + " " + "=" * 40 + "\n"
print(info) print(info)