Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
|
5 |
-
pipe = pipeline("feature-extraction", model="X-D-Lab/MindChat-Qwen-1_8B", trust_remote_code=True)
|
6 |
|
7 |
# 初始化对话历史
|
8 |
history = []
|
@@ -42,8 +41,8 @@ gr.Interface(
|
|
42 |
fn=respond,
|
43 |
inputs="text",
|
44 |
outputs="text",
|
45 |
-
title="
|
46 |
-
description="基于 X-D-Lab/MindChat-Qwen2-0_5B
|
47 |
allow_flagging="never",
|
48 |
live=False
|
49 |
).launch(share=True)
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
pipe = pipeline("text-generation", model="X-D-Lab/MindChat-Qwen2-0_5B")
|
|
|
5 |
|
6 |
# 初始化对话历史
|
7 |
history = []
|
|
|
41 |
fn=respond,
|
42 |
inputs="text",
|
43 |
outputs="text",
|
44 |
+
title="MindChat对话演示",
|
45 |
+
description="基于 X-D-Lab/MindChat-Qwen2-0_5B 构建的中文聊天机器人",
|
46 |
allow_flagging="never",
|
47 |
live=False
|
48 |
).launch(share=True)
|