kank commited on
Commit
952f4ce
·
verified ·
1 Parent(s): 3ab1519
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def greet(name):
4
+ return f"你好,{name}!欢迎访问我的网站 🎉"
5
+
6
+ with gr.Blocks() as demo:
7
+ gr.Markdown("# 🌐 我的 Hugging Face 网站")
8
+ name = gr.Textbox(label="请输入你的名字")
9
+ output = gr.Textbox(label="问候语")
10
+ btn = gr.Button("打招呼")
11
+ btn.click(fn=greet, inputs=name, outputs=output)
12
+
13
+ demo.launch()