Update cli_demo.py

This commit is contained in:
Yang An
2023-08-07 22:57:07 +08:00
committed by GitHub
parent 2c0761afe7
commit 982eef010d

View File

@@ -177,7 +177,7 @@ def main():
# Run chat. # Run chat.
set_seed(seed) set_seed(seed)
try: try:
for response in model.chat(tokenizer, query, history=history, stream=True): for response in model.chat_stream(tokenizer, query, history=history):
_clear_screen() _clear_screen()
print(f"\nUser: {query}") print(f"\nUser: {query}")
print(f"\nQwen-7B: {response}") print(f"\nQwen-7B: {response}")