patharanor commited on
Commit
f42d8b2
·
1 Parent(s): 8b95b29

chore: updated readme

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -22,3 +22,15 @@ tesseract-ocr
22
  ### Secure
23
 
24
  This service is private application, requires user name and password (ref. secret variable `USERNAME` & `PASSWORD`).
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ### Secure
23
 
24
  This service is private application, requires user name and password (ref. secret variable `USERNAME` & `PASSWORD`).
25
+
26
+ ```python
27
+ def auth(username, password):
28
+ u = os.environ.get('USERNAME')
29
+ p = os.environ.get('PASSWORD')
30
+ return (username == u and password == p)
31
+
32
+ with gr.Blocks() as demo:
33
+ # setup layout here...
34
+
35
+ demo.launch(auth=auth)
36
+ ```