Button guide

Streamlit vs Gradio in 2026 layouts, login, sharing and file limits compared, plus when you need neither

Pick Streamlit if you're building a data app or dashboard where you care about the layout, and pick Gradio if you're wrapping a Python function or ML model with inputs and outputs, or want quick share links and Hugging Face Spaces. If your coworkers only need to pass a file or some arguments into a script and get a file back, you don't need either framework - Button (https://button.bitgate.dev) turns a local script into a web form for free (up to 3 colleagues and 100 runs per month) or $15/month for Pro (up to 250 colleagues and 5,000 runs per month), with files up to 25 MB each.

Which one to pick first

Both Streamlit and Gradio are open-source (Apache 2.0) Python libraries, and both let you build a web interface without writing front-end code, so the choice comes down to what your script actually does.

Use Streamlit when you're building a data app or a dashboard with a specific layout. Use Gradio when you have a Python function or an ML model, and you just want to wrap it in defined inputs and outputs.

There's also a third case that comes up all the time: you wrote a script that takes a file and a couple of parameters, and writes out a result file, and now someone on your team needs to run it. You don't need to rewrite that script into a Streamlit or Gradio app at all.

Streamlit vs Gradio vs Button at a glance

Feature Streamlit Gradio Button
Primary use Data apps and dashboards with layouts Web UIs around Python functions and ML models Turning local scripts (Python, R, Node, shell, PowerShell, binaries) into a web form
Local sharing streamlit run app.py serves on http://localhost:8501 and a LAN IP Network URL launch(share=True) creates a public *.gradio.live link (lasts at most about a week) Runs on your computer; colleagues use the tool's page on button.bitgate.dev
Built-in login st.login() with OIDC (Google, Microsoft Entra ID, Okta, Auth0); you write the allowlist check launch(auth=...) with username/password pairs or a function; no invite-by-email Invite by email; colleagues sign in with Google or a one-time email code
Default file upload limit 200 MB (server.maxUploadSize) No default max; set via launch(max_file_size=...) 25 MB per file, up to 8 files and 100 MB per run
Free hosting option Streamlit Community Cloud (1 private app, ~2.7 GB RAM, sleeps after 12 hours idle) Hugging Face Spaces CPU Basic (2 vCPU, 16 GB RAM, 50 GB non-persistent disk, sleeps after 48 hours idle) Free plan ($0): 1 tool, 3 invited people, 100 runs/month, 1 GB transfer/month, runs on your machine
Concurrency Each browser session runs the script separately 1 request at a time per event handler by default 1 run at a time per computer (30 minutes max per run)

Sharing and hosting

With Streamlit, running streamlit run app.py starts a web server at a Local URL (http://localhost:8501) and also exposes a Network URL on your LAN IP. Anyone on the same network can open that Network URL, and there's no login on it by default. If you want it hosted, Streamlit Community Cloud is free and deploys straight from GitHub, with up to about 2.7 GB of memory and one private app at a time. If an app gets no traffic for 12 hours, it goes to sleep and wakes up on the next visit.

Gradio takes a different route for quick sharing. Calling launch(share=True) gives you a public *.gradio.live link tunneled right to your machine, which is handy for showing something off, though the app only works while your computer and the Python process stay on. A share link lasts at most about a week and can drop earlier.

For hosting either Gradio or Streamlit, you can use Hugging Face Spaces, where Spaces can be public, protected, or private. Their free CPU Basic tier gives you 2 vCPU, 16 GB RAM, and 50 GB of non-persistent disk, and it sleeps after 48 hours of inactivity before waking on the next visit. If you need paid hardware, the cheapest option is CPU Upgrade (8 vCPU, 32 GB RAM) at $0.03 per hour.

Login and access control

Neither library handles user permissions out of the box the way a standard SaaS tool does, unless you lean on their hosted platforms.

Streamlit added st.login() in version 1.42 (February 2025), which hooks into an OpenID Connect provider like Google, Microsoft Entra ID, Okta, or Auth0. The catch is that it authenticates the user, but it doesn't authorize them. You still have to write the email allowlist check in your own Python code using st.user.email and st.stop(). On Streamlit Community Cloud, your one free private app lets you invite viewers by email, and they sign in with Google or an emailed link.

Gradio's launch(auth=...) takes a single username/password pair, a list of pairs, or a custom auth function. There's no invite-by-email built into Gradio itself.

When you don't need either: using Button

If you want an interactive dashboard or a model demo, use Streamlit or Gradio. But if your coworkers just need to run a script with an input file and download the output file, building a web UI in Python and figuring out where to host it is extra work you don't need to do.

Button (https://button.bitgate.dev) takes a script on your own computer and turns it into a web form your colleagues can run. It works with any program: Python, Node, R, PowerShell, shell scripts, compiled binaries. The jobs run on your computer, never in Button's cloud (Button's servers relay the form values and files between your colleague's browser and your machine). Your computer does have to be on and online for people to run jobs, and the tool page shows whether your runner is Ready, Busy, or Offline.

Before you set a script up in Button, make it take its inputs as command-line arguments (argparse, commandArgs(), a param() block, or $1 and $2) instead of hard-coded paths or prompts, including each input file path and an output folder for the results:

import argparse
import os

parser = argparse.ArgumentParser()
parser.add_argument("--input-file", required=True)
parser.add_argument("--currency", required=True)
parser.add_argument("--output-dir", required=True)
args = parser.parse_args()

out_path = os.path.join(args.output_dir, "result.csv")
# process args.input_file and write to out_path

Once your script takes arguments, setting it up takes a few steps:

  1. Sign in at button.bitgate.dev.
  2. Install the Button runner on your computer (macOS, Linux, or Windows) using the one-line command the site shows you (it uses curl on macOS and Linux, and PowerShell on Windows).
  3. Open the local setup page, pick your program, and describe its inputs (text, number, yes/no, choice, or files). Fixed flags like --currency are part of the command you approve, so your colleagues only supply the values for the form fields.
  4. Publish the tool to give it its own page, and invite your colleagues.

Your colleagues open the link from their invite email, sign in with Google or a one-time email code, fill in the form, press Run, and download the results. They don't install anything and they never pay.

On the security side, the runner only executes the exact command you approved on that computer, pinned by hash. Every form value is passed to the program as its own argument with no shell, and a value can't start with "-". If you change a tool later, people have to confirm the new version before running it. Every run is logged with who ran it and when, and you can revoke access or set it to expire at any time.

Button has fixed limits you should check against your workload. It accepts files up to 25 MB each, up to 8 files and 100 MB per run, with a 30-minute limit per run and up to 1 MB of logs per run. It executes one run at a time per computer, and you get one computer (runner) per workspace on every plan (pairing a new computer replaces the previous one). Inputs are deleted 24 hours after a run ends, and outputs are deleted after 7 days.

The Free plan is $0 for 1 published tool, 3 people and 100 runs per month; Pro is $15/month, or $144/year, for 50 tools, 250 people and 5,000 runs per month. If your files are over 25 MB, or you need the app running when your own computer is off, use Streamlit or Gradio on a hosted service instead.

FAQ

Does Streamlit have built-in login now?

Yes. Streamlit 1.42 (February 2025) added st.login() for OpenID Connect providers like Google, Microsoft Entra ID, Okta and Auth0. It only handles authentication, so you still write the authorization check yourself with st.user.email and st.stop().

At most about a week: current Gradio docs say share links expire after 1 week (an older guide says 72 hours), and a link can drop earlier. Because it tunnels to your machine, it also stops working when your computer sleeps or the Python process stops.

Where can I host a Streamlit or Gradio app for free?

Streamlit Community Cloud hosts Streamlit apps from GitHub for free, with one private app and about 2.7 GB of memory, sleeping after 12 hours without traffic. Hugging Face Spaces hosts both Gradio and Streamlit apps on its free CPU Basic tier (2 vCPU, 16 GB RAM, 50 GB non-persistent disk), which sleeps after 48 hours of inactivity.

Where do Button jobs actually run?

Button jobs run on your own computer, never in Button's cloud. Button's servers relay the form values and files between your colleague's browser and your computer, and the runner only executes the exact hash-pinned command you approved.

Last updated

Put your script behind a form

Button turns a script on your computer into a web form. Colleagues sign in, fill it in, press Run and download the results. Free for 1 tool and 3 people.