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

Image editor #6169

Merged
merged 222 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
222 commits
Select commit Hold shift + click to select a range
85ba6de
squash commit
freddyaboulton Oct 16, 2023
d2314e5
BugFix: Make FileExplorer Component Templateable (#5933)
freddyaboulton Oct 16, 2023
a008420
Fix notebooks (#5935)
freddyaboulton Oct 16, 2023
2986ea4
Merge branch 'main' into v4
freddyaboulton Oct 16, 2023
dcf13d7
V4: Update Component pyi file (#5937)
freddyaboulton Oct 16, 2023
2dde40a
merge main
freddyaboulton Oct 17, 2023
13ed8a4
V4: Use beta release versions for '@gradio' packages (#5938)
freddyaboulton Oct 17, 2023
d0cc6b1
maybe fix (#5946)
pngwn Oct 17, 2023
9b330eb
Merge main again (#5948)
pngwn Oct 17, 2023
1c390f1
Merge main again (#5949)
pngwn Oct 17, 2023
5b6ef3f
Merge main again (#5950)
pngwn Oct 17, 2023
d558e8d
log
pngwn Oct 17, 2023
7c5e131
log
pngwn Oct 17, 2023
607dab8
fix changesets
pngwn Oct 17, 2023
56b790c
Merge branch 'main' into v4
abidlabs Oct 17, 2023
7f12a83
Merge branch 'main' into v4
abidlabs Oct 17, 2023
319c30f
rererefactor frontend files (#5960)
pngwn Oct 17, 2023
d298e76
Strip vite import warning (#5962)
freddyaboulton Oct 17, 2023
0b99f8e
chore: update versions (beta) (#5769)
pngwn Oct 17, 2023
174b736
release wasm (#5963)
pngwn Oct 17, 2023
5fbda0b
Wasm release (#5964)
pngwn Oct 17, 2023
f7475ee
chore: update versions (beta) (#5965)
pngwn Oct 17, 2023
fdc7c0a
Merge branch 'main' into v4
abidlabs Oct 18, 2023
0c571c0
Add json schema unit tests (#5970)
freddyaboulton Oct 18, 2023
85056de
V4: Simple textbox (#5990)
freddyaboulton Oct 18, 2023
be2ed5e
File upload optimization (#5961)
freddyaboulton Oct 18, 2023
6b0bb5e
Removes deprecated arguments and parameters from v4 (#5968)
abidlabs Oct 18, 2023
9cf40f7
V4: Simple dropdown (#5996)
freddyaboulton Oct 19, 2023
cad537a
pass props to example components and to example outputs (#6014)
pngwn Oct 19, 2023
83e9476
Format js in v4 branch (#6016)
freddyaboulton Oct 19, 2023
de18102
V4: Fix component update bug (#6027)
freddyaboulton Oct 20, 2023
0eb9687
Merge main
freddyaboulton Oct 20, 2023
98ab4f1
Merge branch 'v4' of github.com:gradio-app/gradio into v4
freddyaboulton Oct 20, 2023
8ce90b8
lockfile update
freddyaboulton Oct 20, 2023
d444b8d
Fixing test
freddyaboulton Oct 20, 2023
b98950f
fix test
freddyaboulton Oct 20, 2023
184834d
Add a cli command to list available templates (#6018)
freddyaboulton Oct 20, 2023
b19516b
Merge branch 'main' into v4
abidlabs Oct 20, 2023
dbb7de5
fix tests (#6046)
pngwn Oct 22, 2023
76d28d3
Merge branch 'main' into v4
pngwn Oct 22, 2023
7d07001
fix storybook (#6065)
pngwn Oct 23, 2023
bf38e5f
remove dupe component (#6067)
pngwn Oct 23, 2023
9053c95
Simplify File Component (#6044)
freddyaboulton Oct 23, 2023
447dfe0
Clean up backend of `File` and `UploadButton` and change the return t…
abidlabs Oct 23, 2023
6b82a97
Fix Dropdown Example component and example processing logic (#6075)
abidlabs Oct 24, 2023
3b2d9ea
fix cc build (#6079)
pngwn Oct 24, 2023
f08da1a
Fixes markdown rendering in examples (#6071)
abidlabs Oct 24, 2023
35a227f
Proposal: sample demo for custom components should be a `gr.Interface…
abidlabs Oct 24, 2023
037e5af
WIP: Fix docs (#6082)
freddyaboulton Oct 25, 2023
ce036c5
Pending events behavior (#5826)
dawoodkhan82 Oct 25, 2023
66549d8
Fixes: slider bar are too thin on FireFox (#5984)
dawoodkhan82 Oct 25, 2023
abff6fb
Fix remaining xfail tests in backend (#6073)
freddyaboulton Oct 25, 2023
825c9cd
Fix dev mode model3D (#5955)
freddyaboulton Oct 25, 2023
338969a
V4: Single-file implementation of form components (#6026)
freddyaboulton Oct 25, 2023
cd8146b
Update logos for v4 (#6089)
abidlabs Oct 26, 2023
11d67ae
Add a stand-alone install command and tidy-up the fallback template (…
freddyaboulton Oct 26, 2023
fadc057
V4: Fix constructor_args (#6093)
freddyaboulton Oct 26, 2023
9a40de7
Fix: Move to cache in init postprocess + Fallback Fixes (#6107)
freddyaboulton Oct 26, 2023
e402bf0
fix build (#6112)
pngwn Oct 26, 2023
20dbf90
Update cold-lemons-roll.md
freddyaboulton Oct 26, 2023
06b1182
Revert "Update cold-lemons-roll.md" (#6113)
freddyaboulton Oct 26, 2023
39227b6
Try to trigger a major beta release (#6114)
freddyaboulton Oct 26, 2023
05e19a2
Delete bad changelog (#6115)
freddyaboulton Oct 26, 2023
985f17a
merge
freddyaboulton Oct 26, 2023
3e803a8
Merge branch 'v4' of github.com:gradio-app/gradio into v4
freddyaboulton Oct 26, 2023
94f4385
formatting
hannahblair Oct 27, 2023
205f613
Revert "formatting"
hannahblair Oct 27, 2023
9cad212
Improve Audio Component (#5966)
hannahblair Oct 27, 2023
9ed625f
Fix changesets 2 (#6116)
pngwn Oct 27, 2023
0c8dac3
Fix changesets 2 (#6117)
pngwn Oct 27, 2023
90116f2
chore: update versions (beta) (#5973)
pngwn Oct 27, 2023
9969866
v4
abidlabs Oct 27, 2023
d5d29c9
Open source FRP server and allow `gradio` to connect to custom share …
abidlabs Oct 27, 2023
c3bc515
Gradio custom component publish (#6098)
freddyaboulton Oct 27, 2023
a7435ba
Fix static issues with Lite on v4 (#6124)
aliabd Oct 27, 2023
865a22d
Refactor `Blocks.load()` so that it is in the same style as the other…
abidlabs Oct 28, 2023
d2dfc1b
Small change to make `api_open=False` by default (#6138)
abidlabs Oct 29, 2023
c476bd5
Image v4 (#6094)
pngwn Oct 30, 2023
0d261c6
Fix fallback demo app template code (#6129)
freddyaboulton Oct 30, 2023
5916b3d
fix video path
abidlabs Oct 30, 2023
c092936
Revert "fix video path"
abidlabs Oct 30, 2023
bce37ac
Fix selectable prop in the backend (#6135)
freddyaboulton Oct 30, 2023
71bf270
Fix video (#6140)
abidlabs Oct 30, 2023
274af0f
Merge branch 'main' into v4
abidlabs Oct 30, 2023
53350c7
fix some tests on mac
abidlabs Oct 30, 2023
e4f7b4b
fix circular dependency with client + upload (#6143)
pngwn Oct 30, 2023
40a171e
Fix image double change bug (#6146)
pngwn Oct 30, 2023
0891615
make lite private (#6147)
pngwn Oct 30, 2023
0000a19
fix dropdown arrow size (#6148)
pngwn Oct 30, 2023
90318b1
swap `mode` on the frontned to `interactive` to match the backend (#6…
pngwn Oct 30, 2023
0cc30dd
attempt to create python component
pngwn Oct 30, 2023
103416d
JS READMEs and Storybook on Docs (#6142)
aliabd Oct 30, 2023
9c3bf31
Don't serve files in working directory by default (#6128)
abidlabs Oct 30, 2023
e67e3f8
Fix issues with website deploy (#6151)
aliabd Oct 30, 2023
bf127e1
Swap websockets for SSE (#6069)
aliabid94 Oct 30, 2023
982bff2
Remove duplicate `elem_ids` from components (#6152)
hannahblair Oct 30, 2023
f71ea09
Moves `gradio_cached_folder` inside the gradio temp direcotry (#6155)
abidlabs Oct 30, 2023
1162ed6
Remove `show_edit_button` param in Audio (#6153)
hannahblair Oct 30, 2023
a8ef6d5
Remove interpretation for good (#6154)
abidlabs Oct 30, 2023
db143bd
Make output components not editable if they are being updated (#6157)
dawoodkhan82 Oct 30, 2023
667802a
JS Component Documentation (#6136)
freddyaboulton Oct 30, 2023
88bccfd
Improve Video Component (#6118)
hannahblair Oct 30, 2023
0fe20f3
chore: update versions (beta) (#6122)
pngwn Oct 31, 2023
c829030
changes
pngwn Oct 31, 2023
168cc64
V4 fixes (#6161)
aliabid94 Oct 31, 2023
b3d4de1
Pin 8.9 (#6162)
freddyaboulton Oct 31, 2023
040ec31
Pending outputs fix (#6160)
dawoodkhan82 Oct 31, 2023
44ead3b
Clean root url (#6159)
abidlabs Oct 31, 2023
570679f
V4 fixes (#6167)
aliabid94 Oct 31, 2023
1e2d0e1
Fixes remaining backend tests (#6165)
abidlabs Oct 31, 2023
91a7881
make it work
pngwn Oct 31, 2023
71dd639
testing something (#6173)
abidlabs Oct 31, 2023
74b4ed3
add changeset
gradio-pr-bot Nov 1, 2023
848a630
Merge branch 'v4' into image-editor
abidlabs Nov 1, 2023
7eb93c9
Version 4 development branch (#5498)
pngwn Oct 31, 2023
533fdf7
strip dangling svelte imports (#6171)
pngwn Oct 31, 2023
f3f1d74
leave pre-release mode (#6170)
pngwn Oct 31, 2023
bdf64f4
Final touches main (#6174)
freddyaboulton Oct 31, 2023
1f97f83
Part I: Remove serializes (#6177)
abidlabs Oct 31, 2023
fee317f
Queue concurrency count (#6172)
aliabid94 Oct 31, 2023
58040cb
Allow data at queue join (#6182)
aliabid94 Oct 31, 2023
b0111a9
Remove gr.mix (#6184)
abidlabs Oct 31, 2023
edc1feb
Cleanup theme vars (#6183)
aliabid94 Oct 31, 2023
31817d0
fix (#6185)
pngwn Oct 31, 2023
385b23c
chore: update versions (#6039)
pngwn Oct 31, 2023
6c43228
modify preprocess to use pydantic models (#6181)
abidlabs Oct 31, 2023
dfc3168
JS Param (#6137)
dawoodkhan82 Oct 31, 2023
2ee19f2
Custom Component Guides (#6189)
freddyaboulton Oct 31, 2023
84f468d
patch changesets (#6190)
abidlabs Oct 31, 2023
cc47eed
chore: update versions (#6188)
pngwn Oct 31, 2023
88c4ac8
fix cdn build (#6191)
pngwn Oct 31, 2023
e1f88e9
chore: update versions (#6192)
pngwn Oct 31, 2023
134840b
4.0 Website Changes (#6193)
aliabd Nov 1, 2023
52e4d77
fix`FileExplorer` preprocess (#6211)
pngwn Nov 1, 2023
2d9c73a
Ensure the statustracker for `gr.Image` displays in static mode (#6213)
pngwn Nov 1, 2023
beef9b3
Add that api routes are automatically named to CHANGELOG. (#6227)
freddyaboulton Nov 1, 2023
69e7b70
fix ci (#6235)
pngwn Nov 1, 2023
9182d90
Add likeable to config for Chatbot (#6231)
freddyaboulton Nov 1, 2023
ec15e2c
Model3D panning, improved UX (#6240)
dylanebert Nov 1, 2023
5b09339
Fix stories (#6244)
abidlabs Nov 2, 2023
3b878f4
Update README.md to correct example which throws error when using "sh…
RaghuSpaceRajan Nov 2, 2023
15675eb
Fix file overflow and add keyboard navigation to `FileExplorer` (#5876)
hannahblair Nov 2, 2023
66af378
Remove session if browser closed on mobile (#6241)
aliabid94 Nov 2, 2023
92b0504
fix: avoid unnecessary folders creation when flagging (#6245)
EgonFerri Nov 2, 2023
9614d65
Some tweaks to the Custom Components Guide (#6243)
abidlabs Nov 2, 2023
d4686c4
Fixes: Initial message is overwrtitten in chat interface (#6229)
dawoodkhan82 Nov 2, 2023
5c8e714
ensure radios have different names (#6249)
pngwn Nov 2, 2023
e565daf
Ensure `gr.CheckboxGroup` updates as expected. (#6236)
pngwn Nov 2, 2023
4800d91
Video/Audio fixes (#6234)
freddyaboulton Nov 2, 2023
641766c
Fix bug where radio.select passes the previous value to the function …
freddyaboulton Nov 2, 2023
a34e85e
Improve Embed and CDN handling and fix a couple of related bugs (#6261)
pngwn Nov 2, 2023
11b1814
Fix updating interactive prop (#6266)
abidlabs Nov 2, 2023
7ed76f0
Fix various issues with demos on website (#6268)
aliabd Nov 3, 2023
31393cb
Fixes input `Image` component with `streaming=True` (#6272)
abidlabs Nov 3, 2023
d2e0138
Update dependency msw to v2 (#6270)
renovate[bot] Nov 3, 2023
9239a8f
Ensure Model 3D updates when attributes change (#6255)
hannahblair Nov 3, 2023
fc4588f
Merge branch 'main' into image-editor
pngwn Nov 3, 2023
cef82b8
fix
pngwn Nov 3, 2023
a1e400e
fix
pngwn Nov 3, 2023
fa2b5b9
fix types
pngwn Nov 3, 2023
887cddf
Merge branch 'main' into image-editor
abidlabs Nov 5, 2023
50806f2
fix vs main
pngwn Nov 3, 2023
3fc739a
changes
pngwn Nov 6, 2023
cd8236e
changes
pngwn Nov 14, 2023
b18f696
fix
pngwn Nov 15, 2023
d58cc1d
Merge branch 'main' into image-editor
pngwn Nov 15, 2023
62abb13
add changeset
gradio-pr-bot Nov 15, 2023
ef0229f
fix build
pngwn Nov 15, 2023
bf3b91b
asd
pngwn Nov 15, 2023
ae84cc4
fix crop squish + image allpha issue
pngwn Nov 15, 2023
38a421a
fix webcam
pngwn Nov 15, 2023
7b65f25
fix image editor as input
pngwn Nov 15, 2023
7a38b54
enable undo + redo
pngwn Nov 15, 2023
6b76462
little cleanup
pngwn Nov 15, 2023
d69078e
Merge branch 'main' into image-editor
abidlabs Nov 16, 2023
862f8d9
fixes
pngwn Nov 16, 2023
ed080d1
allow user to draw with no bg
pngwn Nov 16, 2023
1d5d24d
fix webcam
pngwn Nov 16, 2023
5e78ce1
remove rotate
pngwn Nov 16, 2023
4e6953a
Merge branch 'main' into image-editor
pngwn Nov 16, 2023
bbf0680
Merge branch 'main' into image-editor
abidlabs Nov 17, 2023
aa7a415
tweaks
pngwn Nov 17, 2023
320910f
push fix
abidlabs Nov 17, 2023
e9243be
Merge branch 'main' into image-editor
abidlabs Nov 17, 2023
3b2080e
image editor tests and accessibility improvements (#6468)
hannahblair Nov 17, 2023
bef6e9f
add draggable crop
pngwn Nov 17, 2023
94e9c3f
brush swatches
pngwn Nov 17, 2023
a1032b2
fix colopicker interactivity
pngwn Nov 17, 2023
4791b17
fix clear + layer creation
pngwn Nov 17, 2023
9245da1
fix submit + webcam
pngwn Nov 17, 2023
7777d59
fix events again
pngwn Nov 17, 2023
51088b9
fix non interactive mode
pngwn Nov 17, 2023
53a387e
Merge branch 'main' into image-editor
abidlabs Nov 17, 2023
f8cfbfa
python 3.8
abidlabs Nov 17, 2023
c0f28f4
Merge branch 'image-editor' of github.com:gradio-app/gradio into imag…
abidlabs Nov 17, 2023
d3aa142
lint so that we can run static checks
abidlabs Nov 17, 2023
eb5ec31
misc fixes
pngwn Nov 17, 2023
94c32c6
fixes
pngwn Nov 17, 2023
bd5f950
fix things
pngwn Nov 18, 2023
4becb43
fix dark mode
pngwn Nov 18, 2023
f8b6f4b
add crop constraints
pngwn Nov 18, 2023
7db1de6
changers
pngwn Nov 18, 2023
5f6be60
misc fixes
pngwn Nov 18, 2023
3ee47c8
fix statustracker
pngwn Nov 18, 2023
ec69d7e
fix ci
pngwn Nov 18, 2023
ceb00d8
add changeset
gradio-pr-bot Nov 18, 2023
c6319be
crop resize on backend too
pngwn Nov 18, 2023
b47cc8c
fix thing
pngwn Nov 18, 2023
7c6f8cb
format (#6478)
abidlabs Nov 18, 2023
2366525
python tweaks
pngwn Nov 18, 2023
e3fdbe5
tweak ux
pngwn Nov 18, 2023
d86c747
fix ts
pngwn Nov 18, 2023
83c72b5
update vitest
pngwn Nov 18, 2023
9c81092
update vitest
pngwn Nov 18, 2023
fdadd95
update lockfile
pngwn Nov 18, 2023
03500f7
expand changeset
pngwn Nov 18, 2023
06d315a
expand changeset
pngwn Nov 18, 2023
ed625c5
expand changeset
pngwn Nov 18, 2023
6c46f1a
expand changeset
pngwn Nov 18, 2023
d31cd06
fix notebooks
pngwn Nov 18, 2023
8a94dcc
a more betterer changeset
pngwn Nov 18, 2023
e97796c
final tweaks
pngwn Nov 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .changeset/few-tips-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
"@gradio/app": minor
"@gradio/atoms": minor
"@gradio/icons": minor
"@gradio/image": minor
"@gradio/imageeditor": minor
"@gradio/preview": minor
"@gradio/statustracker": minor
"@gradio/upload": minor
"gradio": minor
---

feat:

#### New `ImageEditor` component

A brand new component, completely separate from `Image` that provides simple editing capabilities.

- Set background images from file uploads, webcam, or just paste!
- Crop images with an improved cropping UI. App authors can event set specific crop size, or crop ratios (`1:1`, etc)
- Paint on top of any image (or no image) and erase any mistakes!
- The ImageEditor supports layers, confining draw and erase actions to that layer.
- More flexible access to data. The image component returns a composite image representing the final state of the canvas as well as providing the background and all layers as individual images.
- Fully customisable. All features can be enabled and disabled. Even the brush color swatches can be customised.

<video src="https://user-images.githubusercontent.com/12937446/284027169-31188926-fd16-4a1c-8718-998e7aae4695.mp4" autoplay muted></video>

```py

def fn(im):
im["composite"] # the full canvas
im["background"] # the background image
im["layers"] # a list of individual layers


im = gr.ImageEditor(
# decide which sources you'd like to accept
sources=["upload", "webcam", "clipboard"],
# set a cropsize constraint, can either be a ratio or a concrete [width, height]
crop_size="1:1",
# enable crop (or disable it)
transforms=["crop"],
# customise the brush
brush=Brush(
default_size="25", # or leave it as 'auto'
color_mode="fixed", # 'fixed' hides the user swatches and colorpicker, 'defaults' shows it
default_color="hotpink", # html names are supported
colors=[
"rgba(0, 150, 150, 1)", # rgb(a)
"#fff", # hex rgb
"hsl(360, 120, 120)" # in fact any valid colorstring
]
),
brush=Eraser(default_size="25")
)

```
12 changes: 11 additions & 1 deletion .config/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,17 @@ const js_rules = {
complexity: "error",
"no-else-return": "error",
"no-useless-return": "error",
"no-undef": "error"
"no-undef": "error",
"valid-jsdoc": [
"error",
{
requireReturn: false,
requireParamDescription: true,
requireReturnDescription: true,
requireReturnType: false,
requireParamType: false
}
]
};

const ts_rules = {
Expand Down
Binary file added demo/image_editor/cheetah.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions demo/image_editor/run.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: image_editor"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/image_editor/cheetah.jpg"]}, {"cell_type": "code", "execution_count": null, "id": "44380577570523278879349135829904343037", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "import time\n", "\n", "\n", "def sleep(im):\n", " time.sleep(5)\n", " return [im[\"background\"], im[\"layers\"][0], im[\"layers\"][1], im[\"composite\"]]\n", "\n", "\n", "with gr.Blocks() as demo:\n", " im = gr.ImageEditor(\n", " type=\"pil\",\n", " crop_size=\"1:1\",\n", " )\n", "\n", " with gr.Group():\n", " with gr.Row():\n", " im_out_1 = gr.Image(type=\"pil\")\n", " im_out_2 = gr.Image(type=\"pil\")\n", " im_out_3 = gr.Image(type=\"pil\")\n", " im_out_4 = gr.Image(type=\"pil\")\n", "\n", " btn = gr.Button()\n", " im.change(sleep, outputs=[im_out_1, im_out_2, im_out_3, im_out_4], inputs=im)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
27 changes: 27 additions & 0 deletions demo/image_editor/run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import gradio as gr
import time


def sleep(im):
time.sleep(5)
return [im["background"], im["layers"][0], im["layers"][1], im["composite"]]


with gr.Blocks() as demo:
im = gr.ImageEditor(
type="pil",
crop_size="1:1",
)

with gr.Group():
with gr.Row():
im_out_1 = gr.Image(type="pil")
im_out_2 = gr.Image(type="pil")
im_out_3 = gr.Image(type="pil")
im_out_4 = gr.Image(type="pil")

Copy link
Member Author

Choose a reason for hiding this comment

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

Expand demo. Uodate image mask demo. Add to deploy.

Copy link
Member

Choose a reason for hiding this comment

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

It would be great to have a more complex demo as well, that shows e.g. a custom Brush, crop_size, etc.

btn = gr.Button()
im.change(sleep, outputs=[im_out_1, im_out_2, im_out_3, im_out_4], inputs=im)

if __name__ == "__main__":
demo.launch()
9 changes: 4 additions & 5 deletions gradio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
HighlightedText,
Highlightedtext,
Image,
ImageEditor,
Json,
Label,
LinePlot,
Expand Down Expand Up @@ -82,17 +83,15 @@
from gradio.routes import Request, mount_gradio_app
from gradio.templates import (
Files,
# ImageMask,
# ImagePaint,
ImageMask,
List,
Matrix,
Mic,
Microphone,
Numpy,
# Paint,
# Pil,
Paint,
PlayableVideo,
# Sketchpad,
Sketchpad,
TextArea,
)
from gradio.themes import Base as Theme
Expand Down
2 changes: 1 addition & 1 deletion gradio/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def get_config(self):
for parameter in signature.parameters.values():
if hasattr(self, parameter.name):
value = getattr(self, parameter.name)
config[parameter.name] = value
config[parameter.name] = utils.convert_to_dict_if_dataclass(value)
for e in self.events:
to_add = e.config_data()
if to_add:
Expand Down
2 changes: 2 additions & 0 deletions gradio/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from gradio.components.highlighted_text import HighlightedText
from gradio.components.html import HTML
from gradio.components.image import Image
from gradio.components.image_editor import ImageEditor
from gradio.components.json_component import JSON
from gradio.components.label import Label
from gradio.components.line_plot import LinePlot
Expand Down Expand Up @@ -108,4 +109,5 @@
"Video",
"StreamingInput",
"StreamingOutput",
"ImageEditor",
]
Loading
Loading