05f4e0c 9e7c033 05f4e0c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr def simple_greet(name): if not name: name = "朋友" return f"你好, {name}! API调用成功! 🎉" demo = gr.Interface( fn=simple_greet, inputs=gr.Textbox(label="请输入你的名字"), outputs=gr.Textbox(label="问候语"), title="我的简单测试应用" ) demo.launch()