changxin commited on
Commit
4bb0719
·
1 Parent(s): 87ec30d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
- def fx(变量):
3
- return "你好:"+变量
4
 
5
  title = "测试WEB APP"
6
  description = """
@@ -11,4 +11,4 @@ description = """
11
  """
12
  article = "加入 [组团吹水](https://qm.qq.com/cgi-bin/qm/qr?k=ueJ_sPuOGHOlzSsUC5lVTBdKpQP-PXbO&jump_from=webapi),你不来我不老!"
13
 
14
- gr.Interface(fn=fx,inputs="text",outputs="text",title = title, description = description, article = article).launch()
 
1
  import gradio as gr
2
+ def fx(x):
3
+ return "你好:"+x
4
 
5
  title = "测试WEB APP"
6
  description = """
 
11
  """
12
  article = "加入 [组团吹水](https://qm.qq.com/cgi-bin/qm/qr?k=ueJ_sPuOGHOlzSsUC5lVTBdKpQP-PXbO&jump_from=webapi),你不来我不老!"
13
 
14
+ gr.Interface(fn=fx,inputs=gr.Textbox(placeholder='测试组件,例如随意输入文本字符串"畅心"',label="请输入变量",show_label=True),outputs="text",title = title, description = description, article = article).launch()