Skip to content

Allow overriding HF space repo_id in gradio cc publish #11240

@oxkitsune

Description

@oxkitsune
  • I have searched to see if a similar issue already exists.

Is your feature request related to a problem? Please describe.

We maintain a custom Gradio component for the Rerun viewer (rerun-io/gradio-rerun-viewer), and have a demo space on our Huggingface organization (rerun/gradio-rerun-viewer).

When we are publishing a new version, we cannot deploy the demo and source directly using gradio cc publish, because the repo_id is set to the component package name:

repo_url = api.create_repo(
repo_id=package_name,
repo_type="space",
exist_ok=True,
space_sdk="gradio",
)
repo_id = repo_url.repo_id
api.upload_folder(
repo_id=repo_id,
folder_path=tempdir,
repo_type="space",
)

So the demo space will be created on my personal Huggingface account, instead of our organization.

Describe the solution you'd like

I'd like to be able to specify the repo_id as a CLI argument when publishing, e.g.

gradio cc publish --hf-token <some-token> --repo-id rerun/gradio-rerun-viewer

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions