Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
def fx(x:str):
|
3 |
return '欢迎浏览:'+x
|
4 |
-
gr.
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
7 |
demo.launch()
|
8 |
|
|
|
1 |
import gradio as gr
|
2 |
def fx(x:str):
|
3 |
return '欢迎浏览:'+x
|
4 |
+
demo=gr.Block()
|
5 |
+
with demo:
|
6 |
+
gr.Dataframe(headers=['项目','数据'],interactive=True)
|
7 |
+
text_input=gr.Textbox(placeholder='请输入测试字符串',label="请输入测试内容")
|
8 |
+
bb_button=gr.Button("运行")
|
9 |
+
bb_button.Click(fx, inputs=text_input, outputs=gr.Textbox(label="输出"))
|
10 |
demo.launch()
|
11 |
|