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

modify preprocess to use pydantic models #6181

Merged
merged 20 commits into from
Oct 31, 2023
Merged

modify preprocess to use pydantic models #6181

merged 20 commits into from
Oct 31, 2023

Conversation

abidlabs
Copy link
Member

Part II of #6176

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Oct 31, 2023

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
Storybook ready! Storybook preview
Visual tests all good! Build review
🦄 Changes detected! Details
📓 Notebooks not matching! Details

The demo notebooks don't match the run.py files. Please run this command from the root of the repo and then commit the changes:

pip install nbformat && cd demo && python generate_notebooks.py

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/07fb02725147b1a7b0e52236b7a44d929adcf053/gradio-4.0.0-py3-none-any.whl

Install Gradio Python Client from this PR

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

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Oct 31, 2023

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/uploadbutton minor
gradio minor
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

modify preprocess to use pydantic models

Maintainers or the PR author can modify the PR title to modify this entry.

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 update the changelog file directly.

@abidlabs abidlabs merged commit 62ec207 into main Oct 31, 2023
17 of 18 checks passed
@abidlabs abidlabs deleted the pre branch October 31, 2023 13:48
@pngwn pngwn mentioned this pull request Oct 31, 2023
@@ -1260,6 +1260,14 @@ def preprocess_data(
inputs_cached = processing_utils.move_files_to_cache(
inputs[i], block
)
if getattr(block, "data_model", None) and inputs_cached is not None:
if issubclass(block.data_model, GradioModel): # type: ignore
print("block.data_model", block.data_model, block)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we get rid of the print statements?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops I'll do it on @dawoodkhan82's branch, thanks for catching

Copy link
Member Author

Choose a reason for hiding this comment

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

Done here: #6137

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me know if you find anything else! I merged this just now so that we could have everything in place and do another release

@pngwn pngwn mentioned this pull request Nov 1, 2023
pngwn pushed a commit that referenced this pull request Nov 3, 2023
* modify preprocess to use pydantic models

* changes

* add changeset

* fix

* fix

* fix typing

* save

* revert queuing changes

* fix

* fix

* notebook

* fix

* changes

* add changeset

* fix functional tests

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
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.

3 participants