Make space_sdk configurable in push_to_hub#2515
Open
anneheartrecord wants to merge 1 commit into
Open
Conversation
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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
push_to_hub()hardcodesspace_sdk="gradio"when it creates the Space, so accounts that can no longer create Gradio Spaces get a402 Payment Requiredfromcreate_repoeven though a Static Space would upload fine.This adds a
space_sdkparameter (default"gradio", so existing calls are unchanged) and forwards it tocreate_repo, letting callers pick another SDK:Added two tests: one asserting the default stays
"gradio", one asserting a custom value is forwarded tocreate_repo.Closes #2513