TLDRocket
Sign in

Gradio-Lite: Serverless Gradio Running Entirely in Your Browser

Hugging Face

Hugging Face's Gradio now runs entirely inside your browser, no server needed. It's called Gradio-lite, and it means free, private ML demos that work offline.

Based on reporting by Hugging Face — read the original for the full story.

Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error

Gradio has always been the easiest way to slap a UI on a machine learning model, but it had one nagging requirement: you needed a server somewhere to actually run the Python. Hugging Face just knocked that requirement out with @gradio/lite, a new JavaScript library that runs full Gradio apps inside the browser tab itself, using Pyodide to execute Python as WebAssembly.

The setup is almost comically simple. Drop a script tag and a stylesheet into an HTML file, wrap your normal Gradio Python code in a <gradio-lite> tag, and open the page. No Flask, no Docker, no cloud bill. Want multiple files? Use <gradio-file> tags with a name attribute and mark one as the entrypoint. Need extra packages? A <gradio-requirements> block lets you list them like a requirements.txt, and Gradio-lite installs them via micropip. Hugging Face even shows off a sentiment-analysis app using transformers_js_py that classifies text with a model running fully offline, hosted as a free static Hugging Face Space.

The pitch here is threefold: zero server costs since everything executes on the visitor's machine, snappier interactions because there's no round trip to a backend, and better privacy since user data never leaves the device. For anyone who's ever paid for a GPU instance just to keep a demo alive, that first point alone is a real shift in how cheaply you can distribute an ML app.

It's not free of trade-offs, though. Pyodide itself needs to load before anything runs, which tacks on 5 to 15 seconds of initial wait — annoying for a quick demo, probably fine for something people will actually use. And not every Python package plays nicely with Pyodide's WebAssembly environment, so anything with heavy or unusual dependencies needs a quick compatibility check before you build around it. Hugging Face also put up an interactive playground on gradio.app so people can poke at code and see results without setting up a local file at all.

My take — AI-written commentary, not fact-checked reporting

This is the kind of unglamorous infrastructure work that actually moves the needle for open ML tooling — pushing inference to the client is exactly how you get demos that don't die the moment a hobbyist's free-tier server sleeps. I'd bet within a year half the 'try it live' ML demos floating around Twitter are quietly running on something like this instead of a rented GPU box.

Read more about this at: Hugging Face

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads all relevant sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.