Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create new space with HfApi.create_repo #393

Closed
nateraw opened this issue Oct 6, 2021 · 0 comments · Fixed by #394
Closed

Cannot create new space with HfApi.create_repo #393

nateraw opened this issue Oct 6, 2021 · 0 comments · Fixed by #394

Comments

@nateraw
Copy link
Contributor

nateraw commented Oct 6, 2021

It seems the endpoint to create a HF space is looking for a sdk key/value pair in the json we pass up when making the request. We need to add an option to include SDK choice if repo_type ==. 'space'.

This snippet shows that it fails

from huggingface_hub import HfFolder, HfApi

name = 'deleteme-space-from-hf-hub'

token = HfFolder.get_token()
api = HfApi()
repo_url = api.create_repo(
    token=token,
    name=name,
    organization=None,
    repo_type='space',
    exist_ok=True
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant