mattiashallberg commited on
Commit
1c16d7b
·
verified ·
1 Parent(s): 7982ac1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
app.py CHANGED
@@ -1,2 +1,16 @@
1
  import gradio as gr
2
- gr.Interface.load("mattiashallberg/CoachingTipsAfterSalesMeetingsBot_Dev").launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ import os
3
+
4
+ HF_TOKEN = os.environ.get('hf_access_to_private_space_demo')
5
+
6
+ def environ_auth(username, password):
7
+ if username == os.environ.get('demo_1') and password == os.environ.get('demo_1_password'):
8
+ return True
9
+ elif username == os.environ.get('demo_2') and password == os.environ.get('demo_2_password'):
10
+ return True
11
+ else:
12
+ return False
13
+
14
+ demo = gr.load("mattiashallberg/PrivateShowcase", src="spaces", hf_token=HF_TOKEN)
15
+ demo.queue(max_size=20)
16
+ demo.launch(auth=environ_auth)