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

Add workaround to prevent importing gradio breaking PIL.Image.registered_extensions() #2846

Merged
merged 3 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ No changes to highlight.
No changes to highlight.

## Full Changelog:
No changes to highlight.
* Fixed importing gradio can cause PIL.Image.registered_extensions() to break by `[@aliencaocao](https://github.com/aliencaocao)` in `[PR 2846](https://github.com/gradio-app/gradio/pull/2846)`

## Contributors Shoutout:
No changes to highlight.
Expand Down
2 changes: 2 additions & 0 deletions gradio/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import pandas as pd
import PIL
import PIL.ImageOps
from PIL import Image as _Image # using _ to minimize namespace pollution
from ffmpy import FFmpeg
from markdown_it import MarkdownIt
from mdit_py_plugins.dollarmath import dollarmath_plugin
Expand Down Expand Up @@ -65,6 +66,7 @@ class DataframeData(TypedDict):


set_documentation_group("component")
_Image.init() # fixes https://github.com/gradio-app/gradio/issues/2843


class _Keywords(Enum):
Expand Down