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

Support for In-Memory Byte Transfer #10266

Open
CyberVy opened this issue Dec 30, 2024 · 2 comments
Open

Support for In-Memory Byte Transfer #10266

CyberVy opened this issue Dec 30, 2024 · 2 comments
Labels
enhancement New feature or request needs designing The proposed feature needs to be discussed and designed before being implemented

Comments

@CyberVy
Copy link

CyberVy commented Dec 30, 2024

Gradio is an excellent project, and I really enjoy using it to develop apps. However, I’ve encountered a problem: due to user privacy concerns, my server is not allowed to store user input and output files (e.g., images and audio) on the disk.

To address this issue, I hope Gradio can support in-memory byte transfer functionality. This would allow the communication of files like images or audio directly in memory, avoiding storage on the server's disk and ensuring compliance with privacy policies.

I’ve spent some time studying Gradio's codebase, but the project is quite large for me, and I haven’t made much progress. I would deeply appreciate it if any developer could provide assistance with this.

Thank you for your consideration!

@abidlabs abidlabs added enhancement New feature or request needs designing The proposed feature needs to be discussed and designed before being implemented labels Dec 30, 2024
@abidlabs
Copy link
Member

Hi @CyberVy we can think about this, although it might be hard to support with the current setup in Gradio, which uploads files to the server as soon as they are submitted through the input components. The best approach might be to create a custom component

The tldr is that we've 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's an example of a Gradio custom component: https://github.com/PhyscalX/gradio-image-prompter -- it lets you upload images and process points or draw boxes on top of the image.

If you'd like to create your own, we've put together a Guide: https://www.gradio.app/guides/five-minute-guide, and we're happy to help.

@CyberVy
Copy link
Author

CyberVy commented Dec 30, 2024

Hi @CyberVy we can think about this, although it might be hard to support with the current setup in Gradio, which uploads files to the server as soon as they are submitted through the input components. The best approach might be to create a custom component

The tldr is that we've 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's an example of a Gradio custom component: https://github.com/PhyscalX/gradio-image-prompter -- it lets you upload images and process points or draw boxes on top of the image.

If you'd like to create your own, we've put together a Guide: https://www.gradio.app/guides/five-minute-guide, and we're happy to help.

Thank you very much!🥰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs designing The proposed feature needs to be discussed and designed before being implemented
Projects
None yet
Development

No branches or pull requests

2 participants