Fix default arguments of web demo

pull/41/head
duzx16 2023-03-14 20:30:25 +08:00
parent 0c6d1750ef
commit 584be64161
1 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,9 @@ MAX_TURNS = 20
MAX_BOXES = MAX_TURNS * 2
def predict(input, history=[]):
def predict(input, history=None):
if history is None:
history = []
response, history = model.chat(tokenizer, input, history)
updates = []
for query, response in history: