xiaozhi / app.py
nzjsdsk's picture
Update app.py
91c766f verified
raw
history blame contribute delete
366 Bytes
import gradio as gr
from xiaozhi_gradio import XiaozhiClient
client = XiaozhiClient()
def converse(text_input):
return client.chat(text_input)
demo = gr.Interface(
fn=converse,
inputs=gr.Textbox(label="用户输入"),
outputs=gr.Textbox(label="小智回复"),
title="py-xiaozhi 语音客户端"
)
if __name__ == "__main__":
demo.launch()