davidwisdom-dscout commited on
Commit
9e8cdf8
·
1 Parent(s): bda67b7

demo gradio app with password auth

Browse files
Files changed (2) hide show
  1. .gitignore +1 -0
  2. app.py +8 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .env
app.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import gradio as gr
3
+
4
+ def greet(name):
5
+ return "Hello " + name + "!!"
6
+
7
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
8
+ demo.launch(auth=(os.environ['DEMO_USER'], os.environ['DEMO_PASSWORD']))