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
30.66k stars 2.28k forks source link

PWA configuration for Gradio #6734

Open sumitsahoo opened 6 months ago

sumitsahoo commented 6 months ago

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

Describe the solution you'd like
Since Gradio is a web-based solution a PWA config should add more value. I see Gradio already supporting somewhat responsive designs and if PWA is enabled it will work like an app and can be installed on desktop and phone. All that is needed is a proper manifest (with proper icons) and a service worker. Maybe an option can be added to Gradio launch method which takes make_pwa as a boolean and sets the app icon just like we set favicon_path with the variable pwa_icon. Icons could be made more generic which takes a high res icons and generates favicon and pwa app icons and updates manifest json.

Additional context
N/A

abidlabs commented 5 months ago

This is actually a pretty cool idea, as it would allow people to save popular apps to their phones as apps. Seems like it would be pretty straightforward: https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable

sumitsahoo commented 5 months ago

@abidlabs Yep and the thing is Gradio is already responsive (pretty much). There are helper tools that suggest what is needed for making an existing page a PWA. See PWA Builder. Hope this feature request can be added to the roadmap.

caviri commented 2 months ago

I think this would be a great feature to have on gradio.