Skip to main content

gradio_tiff

PyPI - Version

A custom Gradio component that displays multi-page TIFF images.

Demo screenshot

Install

pip install gradio_tiff

Quick start

import gradio as gr
from gradio_tiff import Tiff


def echo(path: str | None) -> str | None:
    return path


demo = gr.Interface(
    fn=echo,
    inputs=Tiff(value=Tiff().example_value(), label="Upload TIFF"),
    outputs=Tiff(label="Echoed TIFF"),
)

if __name__ == "__main__":
    demo.launch()

The component:

  • accepts .tif / .tiff uploads (single file),
  • renders each page as a PNG canvas and shows page navigation if the file is multi-page,
  • exposes the local file path to your Python function via preprocess,
  • packages a return value (path or URL) as a FileData payload via postprocess,
  • emits upload, change and clear events.

API reference

See DOCS.md for the full auto-generated reference.

Release files for gradio-tiff 0.2.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 gradio-tiff 0.2.0
File Size Uploaded
gradio_tiff-0.2.0.tar.gz 708.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gradio-tiff 0.2.0
File Interpreter ABI Platform
gradio_tiff-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / gradio_tiff-0.2.0.tar.gz

Download URL gradio_tiff-0.2.0.tar.gz
Size 708.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ee3d378ac0d7426daadef2582dc35520b0e9c9c7e43b15b80ff84096e6adef61
BLAKE2b-256 checksum
How to use checksums
4304b695967e7ef81a7b614fe962cef9f80c63e13643e00dd476c749912768b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / gradio_tiff-0.2.0-py3-none-any.whl

Download URL gradio_tiff-0.2.0-py3-none-any.whl
Size 501.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1135c2f8bb398e9872e7618f97ee8c58916d460327c4533193442769a8b72191
BLAKE2b-256 checksum
How to use checksums
cfd8b1b93b2ddc3b88d0497896311faf89ce7920282882dcfb554f5c0f6a7a12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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