Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,4 +42,12 @@ def command_result(text):
|
|
42 |
return output
|
43 |
|
44 |
iface = gr.Interface(fn=command_result, inputs="text", outputs="text", title="中文聊天机器人Demo")
|
45 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
return output
|
43 |
|
44 |
iface = gr.Interface(fn=command_result, inputs="text", outputs="text", title="中文聊天机器人Demo")
|
45 |
+
iface.launch()
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
input_component = gr.Textbox(label = "输入你要对话的文本", value = "你好!")
|
50 |
+
output_component = gr.Textbox(label = "机器人回复")
|
51 |
+
examples = [["你好!"], ["请自我介绍一下!"]]
|
52 |
+
description = "这是一个使用ClueAI/ChatYuan-large-v1构建的中文文本对话聊天机器人"
|
53 |
+
gr.Interface(command_result, inputs = input_component, outputs=output_component, examples=examples, title = "👨🏻🎤 中文智能对话聊天机器人 👨🏻🎤", description=description).launch()
|