YanshekWoo
commited on
Commit
•
fa9d65b
1
Parent(s):
f480fc2
Update README.md
Browse files
README.md
CHANGED
@@ -47,5 +47,5 @@ history = ["可以 认识 一下 吗 ?", "当然 可以 啦 , 你好 。", "
|
|
47 |
history_str = "对话历史:" + tokenizer.sep_token.join(history)
|
48 |
input_ids = tokenizer(history_str, return_tensors='pt').input_ids
|
49 |
output_ids = model.generate(input_ids)[0]
|
50 |
-
print(tokenizer.decode(output_ids))
|
51 |
```
|
|
|
47 |
history_str = "对话历史:" + tokenizer.sep_token.join(history)
|
48 |
input_ids = tokenizer(history_str, return_tensors='pt').input_ids
|
49 |
output_ids = model.generate(input_ids)[0]
|
50 |
+
print(tokenizer.decode(output_ids, skip_special_tokens=True))
|
51 |
```
|