更改

跳转至: 导航搜索

请你帮我编一个调用ERNIE-Bot 4.0的Python程序

添加34字节, 2023年11月23日 (四) 03:36
无编辑摘要
import paddlehub as hub
<nowiki># 加载ERNIE-Bot 4.0模型</nowiki>
module = hub.Module(name="ernie_bot_4.0", task="chat", device="cpu")
<nowiki># 与ERNIE-Bot 4.0进行对话</nowiki>
input_text = "你好,我是人类。"
output_text = module.generate(input_text)
行政员、groupone、管理员
16,820
个编辑

导航菜单