Skip to content

Make space_sdk configurable in push_to_hub#2515

Open
anneheartrecord wants to merge 1 commit into
huggingface:mainfrom
anneheartrecord:fix/2513-configurable-space-sdk
Open

Make space_sdk configurable in push_to_hub#2515
anneheartrecord wants to merge 1 commit into
huggingface:mainfrom
anneheartrecord:fix/2513-configurable-space-sdk

Conversation

@anneheartrecord

Copy link
Copy Markdown

push_to_hub() hardcodes space_sdk="gradio" when it creates the Space, so accounts that can no longer create Gradio Spaces get a 402 Payment Required from create_repo even though a Static Space would upload fine.

This adds a space_sdk parameter (default "gradio", so existing calls are unchanged) and forwards it to create_repo, letting callers pick another SDK:

agent.push_to_hub("username/my-agent", space_sdk="static")

Added two tests: one asserting the default stays "gradio", one asserting a custom value is forwarded to create_repo.

Closes #2513

push_to_hub hardcoded space_sdk="gradio" when creating the Space, so
accounts that can no longer create Gradio Spaces hit 402 Payment Required
even though a Static Space would work. Expose space_sdk as a parameter
(default "gradio", preserving current behavior) and forward it to
create_repo, letting callers pick e.g. "static".
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 this pull request may close these issues.

ENH: Make space_sdk configurable in CodeAgent.push_to_hub()

1 participant