File size: 393 Bytes
332aad2 43377cd 332aad2 43377cd ad1f1bd |
1 2 3 4 5 6 7 8 9 10 |
from huggingface_hub import HfApi
# Use the token from the Secrets Manager
token = os.environ.get('pass') # Retrieve your stored secret
# Check access to the private Space using the token, specifying repo_type="space"
api = HfApi()
repo_info = api.repo_info(repo_id="peymoon/test", token=token, repo_type="space")
print(repo_info) # This will print out information about the private Space
|