Update web_demo.py

pull/155/head
haofanurusai 2023-03-19 16:35:58 +08:00
parent 0473dfb97b
commit a339498980
1 changed files with 1 additions and 1 deletions

View File

@ -14,9 +14,9 @@ def predict(input, max_length, top_p, temperature, history=None):
history = []
flag = True
response = ''
updates = []
for delta, seq, history in model.chat_stream(tokenizer, input, history, max_length=max_length, top_p=top_p,
temperature=temperature):
updates = []
response += delta
if flag:
updates.append(gr.update(visible=True, value="用户:" + input))