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

Enable PWA Client-Side Storage for Stateful and Offline AI Apps in Gradio #10239

Open
1 task done
aribornstein opened this issue Dec 22, 2024 · 1 comment
Open
1 task done

Comments

@aribornstein
Copy link
Contributor

  • I have searched to see if a similar issue already exists.

Is your feature request related to a problem? Please describe.
Gradio has recently added support for deploying manifests for Progressive Web Applications (PWAs). However, it currently lacks support for leveraging client-side storage mechanisms such as Web Storage (session and local), IndexedDB, and the Cache API.
These features are essential for building stateful, interactive AI-powered mobile apps with improved performance, offline capabilities, and better user experiences. Without these options, developers must rely on external storage solutions, which increase latency, cost, and dependency on external services.

Describe the solution you'd like
Support for the following progressive web client-side features:

  1. Web Storage (Session and Local)

    • Use key-value pairs to store small amounts of data on the client.
    • Session Storage: Automatically clears when the session ends (e.g., app closure).
    • Local Storage: Persists until explicitly removed.
    • Example use: Save user preferences, session-specific inputs, or configurations.
  2. IndexedDB

    • Asynchronous API for storing significant amounts of structured or binary data.
    • Example use: Save AI-generated content, user-uploaded data, or debug logs.
  3. Cache API

    • Store and manage web resources like HTML, CSS, JavaScript, or model files for offline use.
    • Example use: Cache machine learning models for offline inference or frequently used assets to reduce latency.

Additional context

  • These features align with Gradio's mission to democratize AI application development, enabling developers to create mobile-friendly, offline-capable apps served directly through Gradio.
  • Providing documentation and examples for integrating Web Storage, IndexedDB, and Cache APIs would make implementation straightforward for developers.

References

@aribornstein
Copy link
Contributor Author

@whitphx thank you for all the hard work let me know what you think of this request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant