Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def respond(messages, history):
|
|
17 |
#input_text = message+",(450字內回覆)"
|
18 |
input_text = [
|
19 |
{"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
|
20 |
-
{"role": "user", "content":
|
21 |
]
|
22 |
text = tokenizer.apply_chat_template(
|
23 |
messages,
|
@@ -39,7 +39,7 @@ def respond(messages, history):
|
|
39 |
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
40 |
|
41 |
# 返回新的消息格式
|
42 |
-
print(f"
|
43 |
print(f"Reply: {response}")
|
44 |
return response
|
45 |
|
|
|
17 |
#input_text = message+",(450字內回覆)"
|
18 |
input_text = [
|
19 |
{"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
|
20 |
+
{"role": "user", "content": messages}
|
21 |
]
|
22 |
text = tokenizer.apply_chat_template(
|
23 |
messages,
|
|
|
39 |
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
40 |
|
41 |
# 返回新的消息格式
|
42 |
+
print(f"Messages: {messages}")
|
43 |
print(f"Reply: {response}")
|
44 |
return response
|
45 |
|