changxin commited on
Commit
d9217c2
1 Parent(s): 2d0a7eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -1,10 +1,8 @@
1
  import gradio as gr
2
- user_db={"admin":"admin","foo":"bar"}
3
  def fx(x:str):
4
  return '欢迎浏览:'+x
5
  gr.Dataframe(headers=['项目','数据'],interactive=True)
6
  text_input=gr.Textbox(placeholder='请输入测试字符串',label="请输入测试内容")
7
  demo=gr.Interface(fx, inputs=text_input, outputs=gr.Textbox(label="输出"))
8
- if __name__=='__main__':
9
- demo.launch(auth=lambda a,b:user_db.get(a)==b,auth_message="欢迎使用本web app")
10
 
 
1
  import gradio as gr
 
2
  def fx(x:str):
3
  return '欢迎浏览:'+x
4
  gr.Dataframe(headers=['项目','数据'],interactive=True)
5
  text_input=gr.Textbox(placeholder='请输入测试字符串',label="请输入测试内容")
6
  demo=gr.Interface(fx, inputs=text_input, outputs=gr.Textbox(label="输出"))
7
+ demo.launch()
 
8