We’ve been hard at work over the past few months, and we’re excited to now announce the stable release of Gradio 5.
With Gradio 5, developers can construct production-ready machine learning web applications which might be performant, scalable, beautifully designed, accessible, and follow best web security practices, all in just a few lines of Python.
To offer Gradio 5 a spin, simply type in your terminal:
pip install --upgrade gradio
and begin constructing your first Gradio application.
Gradio 5: production-ready machine learning apps
If you’ve used Gradio before, you may be wondering what’s different about Gradio 5.
Our goal with Gradio 5 was to hearken to and address essentially the most common pain points that we’ve heard from Gradio developers about constructing production-ready Gradio apps. For instance, we’ve heard some developers tell us:
- “Gradio apps load too slowly” → Gradio 5 ships with major performance improvements, including the power to serve Gradio apps via server-side rendering (SSR) which loads Gradio apps almost instantaneously within the browser. No more loading spinner! 🏎️💨
-
“This Gradio app looks old-school” → Most of the core Gradio components, including Buttons, Tabs, Sliders, in addition to the high-level chatbot interface, have been refreshed with a more modern design in Gradio 5. We’re also releasing a brand new set of built-in themes, to allow you to easily create fresh-looking Gradio apps 🎨
-
“I can’t construct realtime apps in Gradio” → We’ve got unlocked low-latency streaming in Gradio! We use base64 encoding and websockets routinely where it offers speedups, support WebRTC via custom components, and have also added significantly more documentation and example demos which might be focused on common streaming use cases, reminiscent of webcam-based object detection, video streaming, real-time speech transcription and generation, and conversational chatbots. 🎤
-
“LLMs do not know Gradio” → Gradio 5 ships with an experimental AI Playground where you should use AI to generate or modify Gradio apps and preview the app right in your browser immediately: https://www.gradio.app/playground
Gradio 5 provides all these features while maintaining Gradio’s easy and intuitive developer-facing API. Since Gradio 5 intended to be a production-ready web framework for every kind of machine learning applications, we have also made significant improvements around web security (including getting a Third-party audit of Gradio) — more about that in an upcoming post!
Breaking changes
Gradio apps that didn’t raise any deprecation warnings in Gradio 4.x should proceed to work in Gradio 5, with a small variety of exceptions. See an inventory of breaking changes in Gradio 5 here.
What’s next for Gradio?
Most of the changes we’ve made in Gradio 5 are designed to enable latest functionality that we shall be shipping in the approaching weeks. Stay tuned for:
-
Multi-page Gradio apps, together with native navbars and sidebars
-
Support for running Gradio apps on mobile using PWA and potentially native app support
-
More media components to support emerging modalities around images and videos
-
A richer DataFrame component with support for common spreadsheet-type operations
-
One-line integrations with machine learning model and API providers
-
Further improvements that can decrease the memory consumption of Gradio apps
And rather more! With Gradio 5 providing a sturdy foundation to construct web applications, we’re excited to really start letting developers construct all varieties of ML apps with Gradio.
Try Gradio 5 right away
Listed below are some Hugging Face Spaces which might be running Gradio 5:
