We’ve been hard at work over the past few months, and we’re excited to announce the stable release of Gradio 5.
Gradio 5 enables developers to build production-ready machine learning web applications that are performant, scalable, beautifully designed, easily accessible, and compliant with web security best practices, all in a few lines of Python. You can build it.
To try out Gradio 5, just type the following in your terminal:
pip install –upgrade gradio
Then start building your first Gradio application.
Gradio 5: Production-ready machine learning app
If you’ve used Gradio before, you may be wondering what’s different about Gradio 5.
Our goal for Gradio 5 was to listen to and address the most common pain points we hear from Gradio developers when it comes to building production-ready Gradio apps. For example, we’ve heard from some developers:
“Gradio apps load too slowly” → Gradio 5 includes the ability to serve Gradio apps via server-side rendering (SSR), which loads Gradio apps almost instantly in the browser. No need to load spinners anymore. 🏎️💨
“This Gradio app looks outdated” → Many of Gradio’s core components, including buttons, tabs, sliders, and the high-level chatbot interface, have been updated with a more modern design in Gradio 5. We’re releasing a new set of built-in themes to make it easy to create fresh-looking Gradio apps 🎨
“Can’t build real-time apps with Gradio” → Low-latency streaming is now possible with Gradio! Automatically uses Base64 encoding and WebSockets for speed, and supports WebRTC via custom components. Also, webcam-based object detection, video streaming, real-time audio transcription and generation, and conversational chatbots. 🎤
“LLM doesn’t know Gradio” → Gradio 5 ships with an experimental AI playground that uses AI to generate or modify Gradio apps and preview them instantly in your browser: https //www.gradio.app/playground
Gradio 5 provides all of these features while maintaining Gradio’s simple and intuitive developer API. Because Gradio 5 was intended to be a production-ready web framework for all kinds of machine learning applications, we also made significant improvements in web security (including getting third-party audits for Gradio). More on this in a future post. !
significant changes
Gradio apps that did not encounter deprecation warnings in Gradio 4.x should continue to work in Gradio 5, with a few exceptions. A list of breaking changes in Gradio 5 can be found here.
What’s next for Gladio?
Many of the changes made in Gradio 5 are designed to enable new features that will be released in the coming weeks. Stay tuned:
Multi-page Gradio app with native navigation bar and sidebar
Support for running Gradio apps on mobile using PWA and potentially native app support
Adding media components to support new image and video modalities
Richer DataFrame component that supports common spreadsheet-type operations
One-line integration with machine learning models and API providers
Further improvements to reduce memory consumption in Gradio apps
Even more! Gradio 5 provides a solid foundation for building web applications, so we’re really looking forward to enabling developers to use Gradio to build all kinds of ML apps.
Try Gradio 5 today
Here’s a portion of Hug Face Space running Gradio 5.