Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
|
5 |
|
6 |
-
|
|
|
|
|
|
|
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()
|