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

Fixes to Website Demo Upload Script #8419

Merged
merged 4 commits into from
May 30, 2024
Merged

Fixes to Website Demo Upload Script #8419

merged 4 commits into from
May 30, 2024

Conversation

aliabd
Copy link
Collaborator

@aliabd aliabd commented May 30, 2024

We've been having a recurring issue where the script fails and many of the demos don't upload. It seems like the issue was with the create_repo function unnecessarily running too many times and creating a bunch of 409 errors which lead to 403 errors.

I made some changes:

  • create_repo will only run if a space url doesn't return 200
  • the client is created once instead of for every demo
  • the create/upload logic is inside a try except so it doesn't stop other demos from getting uploaded.

I tested this with a list of over 500 demos and there wasn't any errors! Will keep an eye on it over next few days

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented May 30, 2024

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website building...
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/db8554d2202a52d76f3312222fab6a98ff41b6cf/gradio-4.32.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@db8554d2202a52d76f3312222fab6a98ff41b6cf#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-builds.s3.amazonaws.com/db8554d2202a52d76f3312222fab6a98ff41b6cf/gradio-client-0.20.0.tgz

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented May 30, 2024

🦄 no changes detected

This Pull Request does not include changes to any packages.

__No changes detected. __

  • Maintainers can select this checkbox to manually select packages to update.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can create the changelog file directly.

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aliabd !

Copy link
Member

@pngwn pngwn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks @aliabd!

@aliabd aliabd merged commit 5c6d4c4 into main May 30, 2024
7 checks passed
@aliabd aliabd deleted the aliabd/fix-demo-upload branch May 30, 2024 21:07
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.

4 participants