gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.43k stars 2.53k forks source link

support multiple input types for `gr.Image` #7870

Closed not-lain closed 6 months ago

not-lain commented 7 months ago

I have recently created an open source library called loadimg that can read an input image of any type (full code here https://github.com/not-lain/loadimg) and I thought it would be a nice addition to gr.Image allowing for gr.Image(type="any").

===============================================================

I am also new to creating python libraries so please always pin a version, if you are also interested I can transfer the library ownership in both pypi and github to the huggingface/gradio-app community because I am the only maintainer/owner of the library and I might use a hand. I believe that loadimg has the ability to be integrated in other places too such as being used by default for loading/converting images by users, or to be integrated into the datasets library, which is why i really want to make it work.

===============================================================

do let me know if you are willing to use the library or to take over its ownership.

Kind regards,

abidlabs commented 6 months ago

Hi @not-lain thanks for the suggestion. This is not a good fit for us as we have our own UI and preprocessing/postprocessing and we try to minimize external dependencies as much as possible. If there are missing formats that you'd like to support in gr.Image, I'd suggest opening a PR to add them directly in Gradio without adding external dependencies. I'll go ahead and close this.

freddyaboulton commented 6 months ago

@not-lain you can also make your own custom image component that supports more types!

not-lain commented 6 months ago

@freddyaboulton yessss, the custom image component appeals to me so thank you for the idea, i'll try to create my own soon. so thanks a lot Freddy, and have a wonderful night ✨✨