Skip to main content

nanohub-gradio

Documentation Status

Tools for running Gradio applications on nanoHUB.

Documentation

Full documentation is available at https://nanohub-gradio.readthedocs.io

Installation

pip install nanohub-gradio

Features

  • Jupyter Magic Command (%set_gradio_env): Configure environment variables for Gradio apps directly in Jupyter notebooks
  • Command-line Tool (start_gradio): Launch Gradio applications with automatic proxy configuration

Quick Start

Jupyter Notebook

%load_ext nanohubgradio
%set_gradio_env

import os
import gradio as gr

def greet(name):
    return f"Hello {name}!"

with gr.Blocks() as app:
    gr.Markdown("# Gradio App on nanoHUB")
    with gr.Row():
        text_input = gr.Textbox(label="Your Name")
        output = gr.Textbox(label="Greeting")
    text_input.change(greet, inputs=[text_input], outputs=[output])

if __name__ == "__main__":
    root_path = os.getenv("GRADIO_ROOT_PATH", "")
    app.launch(
        server_name="0.0.0.0",
        server_port=8001,
        root_path=root_path if root_path else None,
        share=False
    )

Command Line

start_gradio --app myapp.py

Environment Variables

The magic command sets the following environment variables:

  • GRADIO_ROOT_PATH - The proxy path prefix for Gradio
  • GRADIO_HOST - The bind host for Gradio
  • GRADIO_PORT - The port for Gradio

Requirements

  • Python >= 3.8
  • IPython >= 7.0
  • Gradio >= 4.0
  • Must be running on a nanoHUB environment with SESSION and SESSIONDIR environment variables set

License

MIT License - Copyright 2026 HUBzero Foundation, LLC.

Metadata

Release files for nanohub-gradio 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nanohub-gradio 0.1.0
File Size Uploaded Provenance
nanohub_gradio-0.1.0.tar.gz 11.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nanohub-gradio 0.1.0
File Interpreter ABI Platform
nanohub_gradio-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.6 kB

Release files / nanohub_gradio-0.1.0.tar.gz

Download URL nanohub_gradio-0.1.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6826266f345e221b0b234ecd6e06982b4e1f0b5b9740861defab4bc9d2b420fd
BLAKE2b-256 checksum
How to use checksums
104079fcf76c31771a1250d30605fdbaa0cc50d9cc469982c7a4bc8296a0d3b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / nanohub_gradio-0.1.0-py3-none-any.whl

Download URL nanohub_gradio-0.1.0-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cdccede02951b3f4b7fcd9e08d426fd979d9ab348cde4ddbe7e4242339baf80b
BLAKE2b-256 checksum
How to use checksums
ec2c58f2a603eee8d114a91225aa67b4e8191cd445db82510bcc7440de5c6568
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Security for nanohub-gradio 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page