MCPcopy
hub / github.com/BinNong/meet-libai / run_webui

Function run_webui

webui.py:19–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def run_webui():
20 chat_app = gr.ChatInterface(
21 chat_libai,
22 chatbot=gr.Chatbot(height=400, avatar_images=__AVATAR),
23 textbox=gr.Textbox(placeholder="请输入你的问题", container=False, scale=7),
24 title="「遇见李白」📒",
25 description="你可以问关于李白的一切",
26 theme="default",
27 examples=["您好", "李白与高力士的关系是什么", "杜甫是谁", "李白会写代码吗", "请生成李白在江边喝酒的图片",
28 "杜甫最好的一首诗是什么?", "请将这首诗转成语音", "根据参考文献回答,李白在哪里出生",
29 "请根据以下白话文来搜索相应的古文,白话文的内容为,守孝期在古代是多长",
30 "请根据以下古文来搜索相应的古文,古文的内容为,床前明月光"],
31 cache_examples=False,
32 retry_btn=None,
33 submit_btn="发送",
34 stop_btn="停止",
35 undo_btn="删除当前",
36 clear_btn="清除所有",
37 concurrency_limit=4,
38 )
39
40 chat_app.launch(server_name="0.0.0.0"
41 , server_port=int(Config.get_instance().get_with_nested_params("server", "ui_port"))
42 , share=Config.get_instance().get_with_nested_params("server", "ui_share")
43 , max_threads=10)
44
45
46if __name__ == "__main__":

Callers 2

create_appFunction · 0.90
webui.pyFile · 0.85

Calls 2

get_instanceMethod · 0.80

Tested by

no test coverage detected