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.41k stars 2.53k forks source link

New image input by drawing rectangle #5034

Closed anyangml closed 10 months ago

anyangml commented 1 year ago

Is your feature request related to a problem? Please describe.

I am working on an OCR project, and I would like the user to provide image input by drawing a rectangle directly instead of uploading the image.

Describe the solution you'd like

A new option to gradio.Image(source = "select")

Additional context
No

abidlabs commented 11 months ago

Hey! We've now made it possible for Gradio users to create their own custom components -- meaning that you can write some Python and JavaScript (Svelte), and publish it as a Gradio component. You can use it in your own Gradio apps, or share it so that anyone can use it in their Gradio apps. Here are some examples of custom Gradio components:

You can see the source code for those components by clicking the "Files" icon and then clicking "src". The complete source code for the backend and frontend is visible. In particular, its very fast if you want to build off an existing component. We've put together a Guide: https://www.gradio.app/guides/five-minute-guide, and we're happy to help. Hopefully this will help address this issue.

abidlabs commented 10 months ago

Closing as this is actually a duplicate of: #2316