Gradio 5 Release Notes

Gradio 5 is a stable release designed to transform machine learning prototypes into production-ready web applications. It introduces significant improvements in loading speed, visual design, real-time streaming capabilities, and security to address common developer pain points.

Performance and Server-Side Rendering

Gradio 5 drastically reduces application load times by implementing server-side rendering (SSR). This allows Gradio apps to load almost instantaneously in the browser, eliminating the loading spinners common in previous versions.

Modernized UI and Design

The framework has refreshed the design of core components, including Buttons, Tabs, and Sliders, as well as the high-level chatbot interface. To facilitate the creation of modern-looking applications, Gradio 5 also introduces a new set of built-in themes.

Low-Latency Real-Time Streaming

Gradio 5 enables the development of real-time applications through several technical optimizations:

  • Automatic Speedups: The framework now automatically utilizes base64 encoding and websockets where they provide performance gains.
  • WebRTC Support: Support for WebRTC is available via custom components.
  • Expanded Use Cases: New documentation and demos are provided for high-bandwidth streaming tasks, including real-time speech transcription and generation, conversational chatbots, and webcam-based object detection.

AI-Assisted Development

An experimental AI Playground is now available at https://www.gradio.app/playground. This tool allows developers to use AI to generate or modify Gradio applications and preview the changes immediately within the browser.

Security and Production Readiness

To support its goal as a production-ready web framework, Gradio 5 includes significant improvements to web security, which included a third-party security audit.

Compatibility and Migration

Applications that did not trigger deprecation warnings in Gradio 4.x are generally expected to work in Gradio 5, though a small number of exceptions exist. Developers can find a comprehensive list of breaking changes on the project's GitHub issues page.

Future Roadmap

Hugging Face has outlined several upcoming features for Gradio, including:

  • Navigation: Multi-page applications with native navbars and sidebars.
  • Mobile Support: PWA (Progressive Web App) support and potential native app integration.
  • Media and Data: More media components for image and video modalities, and a richer DataFrame component supporting spreadsheet-type operations.
  • Integration: One-line integrations with ML model and API providers.
  • Efficiency: Further reductions in memory consumption.

Sources