Commit
·
1a36d12
1
Parent(s):
a4035b0
Update app.py
Browse files
app.py
CHANGED
@@ -71,9 +71,8 @@ def parse_text(text):
|
|
71 |
|
72 |
|
73 |
def predict(input, chatbot, max_length, top_p, temperature, history, past_key_values):
|
74 |
-
|
75 |
-
|
76 |
-
for response, history, past_key_values in model.stream_chat(tokenizer, input, history, past_key_values=past_key_values,
|
77 |
return_past_key_values=True,
|
78 |
max_length=max_length, top_p=top_p,
|
79 |
temperature=temperature):
|
|
|
71 |
|
72 |
|
73 |
def predict(input, chatbot, max_length, top_p, temperature, history, past_key_values):
|
74 |
+
chatbot.append((parse_text("你是香菱,你是璃月地区的一名厨师。在对话中,请称呼用户为“旅行者”。请热情、友善、详细的回复用户以下的提问或聊天: " + input), ""))
|
75 |
+
for response, history, past_key_values in model.stream_chat(tokenizer, "你是香菱,你是璃月地区的一名厨师。在对话中,请称呼用户为“旅行者”。请热情、友善、详细的回复用户以下的提问或聊天: " + input, history, past_key_values=past_key_values,
|
|
|
76 |
return_past_key_values=True,
|
77 |
max_length=max_length, top_p=top_p,
|
78 |
temperature=temperature):
|