peymoon commited on
Commit
938bcee
·
verified ·
1 Parent(s): dac2574

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,7 +1,11 @@
 
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
7
  demo.launch()
 
1
+ import os
2
  import gradio as gr
3
 
4
+ # Access Hugging Face secret from the environment
5
+ hf_token = os.environ.get('pass') # 'pass' is the name of the secret you set
6
 
7
+ # Load the private Space using the secret
8
+ demo = gr.load("peymoon/test", hf_token=hf_token, src="spaces")
9
+
10
+ # Launch the public-facing interface
11
  demo.launch()