SyncAI.news, a Varaisys broadcasting
A Security Review of Gradio 5
HF

Hugging Face Blog

· 1 min read

AI LabsHugging Face Blog

A Security Review of Gradio 5

We audited Gradio 5 so that your machine learning apps are safe!

In the past few years, Gradio (>6 million monthly Pypi installs) has become the default way to build machine learning web applications in Python. In just a few lines of code, you can create a user interface for an image generation app, a chatbot, or any other kind of ML app and share it with others using Gradio’s built-in share links or Hugging Face Spaces.

import gradio as gr
def generate(seed, prompt):  
    ...  
    return image
    
# gr.Interface creates a web-based UI
gr.Interface(
    generate,   
    inputs=[gr.Slider(), gr.Textbox()],  
    outputs=[gr.Image()]
).launch(share=True)  
# share=True generates a public link instantly

Our goal with Gradio is to allow developers to build web applications that work great out-of-the-box for machine learning use cases. This has meant letting you, as a developer, easily build applications that:

  • Scale easily to large numbers of concurrent users
  • Are accessible to as many users as possible
  • Provide consistent UI, UX, and theming
  • Work reliably across a large number of browsers and devices

...even if you are not an expert in scaling, accessibility, or UI/UX!

Now, we’re adding web security to this list. We asked Trail of Bits, a well-known cybersecurity company, to conduct an independent audit of Gradio. The security issues they discovered were all fixed ahead of the Gradio 5 release.

This means that machine learning apps that you build with Gradio 5 will follow best practices when it comes to web security without any significant changes to your code.

Why a security audit?

In the past couple of years, the Gradio team has worked with the community to patch security vulnerabilities as they are discovered. But as Gradio’s popularity has grown (with >470,000 Gradio apps currently on Hugging Face Spaces), ensuring security has become even more important.

Major findings

Gradio apps running locally

Gradio apps deployed on Hugging Face Spaces or other servers

Original source

This story was published by Hugging Face Blog. SyncAI.news shows a preview; the complete article is on the publisher's site.

Read the full story on huggingface.co

Similar News