Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,10 @@ def respond(message, history):
|
|
20 |
reply = response[0]['generated_text']
|
21 |
|
22 |
# 返回新的消息格式
|
23 |
-
return [{"role": "user", "content": message}, {"role": "assistant", "content": reply}], history + [{"role": "user", "content": message}, {"role": "assistant", "content": reply}]
|
24 |
-
|
|
|
|
|
25 |
# 設定 Gradio 的聊天界面
|
26 |
demo = gr.ChatInterface(fn=respond, title="Chat with Qwen 2.5", description="與 HelloSun/Qwen2.5-0.5B-Instruct-openvino 聊天!", type='messages')
|
27 |
|
|
|
20 |
reply = response[0]['generated_text']
|
21 |
|
22 |
# 返回新的消息格式
|
23 |
+
#return [{"role": "user", "content": message}, {"role": "assistant", "content": reply}], history + [{"role": "user", "content": message}, {"role": "assistant", "content": reply}]
|
24 |
+
print(reply)
|
25 |
+
return reply
|
26 |
+
|
27 |
# 設定 Gradio 的聊天界面
|
28 |
demo = gr.ChatInterface(fn=respond, title="Chat with Qwen 2.5", description="與 HelloSun/Qwen2.5-0.5B-Instruct-openvino 聊天!", type='messages')
|
29 |
|