Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
from huggingface_hub import HfApi
|
| 2 |
|
| 3 |
# Use the token from the Secrets Manager
|
|
@@ -7,3 +9,9 @@ token = os.environ.get('pass') # Retrieve your stored secret
|
|
| 7 |
api = HfApi()
|
| 8 |
repo_info = api.repo_info(repo_id="peymoon/test", token=token, repo_type="space")
|
| 9 |
print(repo_info) # This will print out information about the private Space
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os # Make sure to import os module
|
| 2 |
+
import gradio as gr
|
| 3 |
from huggingface_hub import HfApi
|
| 4 |
|
| 5 |
# Use the token from the Secrets Manager
|
|
|
|
| 9 |
api = HfApi()
|
| 10 |
repo_info = api.repo_info(repo_id="peymoon/test", token=token, repo_type="space")
|
| 11 |
print(repo_info) # This will print out information about the private Space
|
| 12 |
+
|
| 13 |
+
# Load the private Space using the Hugging Face token
|
| 14 |
+
demo = gr.load("peymoon/test", hf_token=token, src="spaces")
|
| 15 |
+
|
| 16 |
+
# Launch the public-facing interface
|
| 17 |
+
demo.launch()
|