peymoon commited on
Commit
43377cd
·
verified ·
1 Parent(s): ad1f1bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -10
app.py CHANGED
@@ -1,17 +1,9 @@
1
- import os
2
- import gradio as gr
3
  from huggingface_hub import HfApi
4
 
5
  # Use the token from the Secrets Manager
6
  token = os.environ.get('pass') # Retrieve your stored secret
7
 
8
- # Check access to the private Space using the token
9
  api = HfApi()
10
- repo_info = api.repo_info(repo_id="peymoon/test", token=token)
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()
 
 
 
1
  from huggingface_hub import HfApi
2
 
3
  # Use the token from the Secrets Manager
4
  token = os.environ.get('pass') # Retrieve your stored secret
5
 
6
+ # Check access to the private Space using the token, specifying repo_type="space"
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