App hosting ยท Gradio

Gradio hosting on your own address, without a share link

Gradio's share links expire and run through somebody else's tunnel. An app here keeps its own https address at name.fadehost.app, deploys from GitHub and stays up on a paid plan. The honest limit: these machines are CPU only.

Free app
256 MB, Node.js, Python, Go, Java and more
Address
https://name.fadehost.app, sleeps when idle on free
Paid
from $2/mo or $20/yr for 1 GB, with an always-on address included
Regions
France, Montreal, Oregon, Singapore

Listening where the proxy can find it

import os
import gradio as gr

demo = gr.Interface(fn=lambda name: "hello " + name, inputs="text", outputs="text")

demo.launch(
    server_name="0.0.0.0",
    server_port=int(os.environ.get("PORT", 8080)),
)

server_name="0.0.0.0" and the PORT variable are the two things to change from a laptop script. Leave share=True off: the app has an address of its own and does not need Gradio's tunnel. gradio goes in requirements.txt.

CPU only, which decides what fits

There is no GPU here, on any plan, and GPU workloads are outside what app hosting is for. That makes the question what your app does rather than how big the model is:

  • Fits well: a UI in front of an API you call, a small scikit-learn or ONNX model, classic computer vision, text processing, a demo of your own code.
  • Does not fit: a large language model or a diffusion model loaded into the process. Those want a GPU, which is a different kind of host.

A Gradio app that calls a hosted inference API is a small web app and runs on any tier.

The queue, and 256 MB

Gradio queues requests by default, which keeps a slow function from piling up. Memory follows what you load: the free 256 MB is for a light demo, 1 GB at $2 a month is the comfortable size, and an app can take up to 3 GB more at $1 a gigabyte. On the free plan the address also sleeps when nobody has opened it for a while and wakes on the next request, so a demo you are sharing with people belongs on a paid plan.

Model files and the disk

Weights committed to the repository are pulled on every deploy and count against the app's disk, 3 GB on the free plan and 5 to 20 GB on the paid ones. Weights downloaded at start belong under /data, which survives redeploys, so the app does not fetch them again every time. Cache them there and check for the file before downloading.

Frequently asked questions

Is there a GPU?

No. The apps run on CPU, on every plan, and GPU workloads are outside what app hosting is for. A Gradio front end calling a hosted inference API is the pattern that works here.

Do I still need share=True?

No, and you should turn it off. The app has its own https address at name.fadehost.app, with a certificate, which is what a share link was standing in for.

Can I run a small model in the app?

Yes, if it fits the memory: scikit-learn, ONNX and classic vision models do on a paid tier with 1 GB or more. Large language models and diffusion models do not.

Which port does the app listen on?

The PORT environment variable, 8080 by default, on 0.0.0.0. A server bound to 127.0.0.1 answers only itself and the web address gets nothing.

How does the public address work?

Give the app a web address in the panel and it is served at https://name.fadehost.app behind the Cloudflare proxy with a certificate. It comes with the plan on every tier. On the free tier the address sleeps when nobody has used it for a while and wakes on the next request; on a paid tier it stays awake. Your own domain can point at it.

What happens on a deploy?

The repository is cloned at your branch, dependencies install, the build runs when there is one, the app starts. With auto-deploy on, every push does the same. The live console shows each step; a failed one is explained in plain words.

Related

Gradio hosting on your own address, without a share link

Deploy a Gradio app free