Gradio, a popular open-source Python framework for building user interfaces (UI) for machine learning models, has recently released its stable version 5.0. With over 2 million monthly users and over 470,000 applications on Hugging Face Spaces, Gradio has become a standard tool for developing, sharing, and using machine learning applications.
The new version focuses on addressing pain points reported by Gradio developers regarding the production readiness of applications. Key improvements include:
Gradio 5.0 is served over server-side rendering (SSR) whenever possible, and especially on Hugging Face Spaces. This results in significantly faster loading times and improved search engine optimization (SEO).
Many components in Gradio 5.0 have been redesigned with a modern UI, including buttons, tabs, sliders, JSON components, and the "ChatInterface" class for chatbot UIs. Frames, shadows, fonts, and colors in dark mode have been globally adjusted for a cleaner and more modern look.
Streaming audio, images, and videos as both input and output is now fully supported. Gradio now uses the HTTP Live Streaming protocol for streaming media, which provides a significantly better user experience when streaming audio and video. Developers have more control over media streaming with intuitive parameters that allow them to control the frequency of streams and the queue for streaming demos.
As Gradio 5.0 is designed as a production-ready web framework for all kinds of machine learning applications, significant security improvements have been made, including a third-party audit.
Gradio now includes an AI-powered playground that allows developers to generate Gradio applications from a prompt and view the results directly in the browser. This AI playground is a useful tool for creating simple Gradio apps or making changes to existing ones.
Gradio 5.0 requires Python 3.10 or higher. Installation is done locally via the "pip install gradio --upgrade" command. For Hugging Face Spaces, upgrading to Gradio 5.0 can be done by updating the "sdk_version" to 5.0.0 in the "README.md" file.
Gradio 5.0 includes some breaking changes that affect security, performance, and developer experience. Major changes include:
Gradio 5.0 is a major release with numerous improvements and new features that make the framework more powerful, user-friendly, and secure. Upgrading to the new version is recommended for all developers who use Gradio to build machine learning applications.
https://github.com/gradio-app/gradio/issues/9463
https://gradio.app/
https://www.gradio.app/changelog
https://github.com/gradio-app/gradio
https://twitter.com/_akhaliq?lang=tr
https://www.reddit.com/r/StableDiffusion/comments/y56qb9/security_warning_do_not_use_share_in/
https://www.gradio.app/docs/gradio/interface