Registry / ai-ml / gradio_imageslider

gradio_imageslider

JSON →
library0.0.20pypypi✓ verified 84d ago

A custom Gradio component for comparing two images via an interactive before/after slider. Current version 0.0.20. Release cadence is irregular.

pip install gradio_imageslider
INSTALL
IMPORT
SIG · GRADIO_IMAGESLIDER
G
gradio_imageslider
ai-mlpythonv0.0.20
Install
17.1s avg
Import
10838ms
Disk
337MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.20 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 9.130s · 325.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 17.1s · import 8.210s · 319MB
337MB installed
● package 337MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ImageSlider
from gradio_imageslider import ImageSlider
Correct import path for the component class.

Minimal example showing a static before/after comparison with two images.

import gradio as gr from gradio_imageslider import ImageSlider with gr.Blocks() as demo: ImageSlider(value=("image1.png", "image2.png"), label="Compare") demo.launch()
Debug
Known issues
gotchaThe component does not support dynamic updates via gr.update() in early releases (<=0.0.18). If you need to update images after the interface loads, consider using a ref or a workaround.
fix
Upgrade to >=0.0.20 or use a Gradio 4.x state pattern.
affects: <=0.0.18
gotchaIf you pass a single string instead of a tuple, the component will fail silently. Always pass a tuple of two strings (file paths or URLs).
fix
Ensure value is a tuple: ("img_left.png", "img_right.png").
affects: all
Errors
Common errors & fixes
AttributeError: module 'gradio_imageslider' has no attribute 'ImageSlider'
Incorrect import (e.g., import gradio_imageslider as gis; gis.ImageSlider) or old version.
fix
Use: from gradio_imageslider import ImageSlider
TypeError: ImageSlider.__init__() got an unexpected keyword argument 'value'
Older versions (<0.0.15) used 'images' instead of 'value'.
fix
Use 'value' parameter (or upgrade).
Upgrade
Version history
0.0.20latest on PyPI · released Apr 19, 2024
Audit
Dependencies
gradiorequiredRequired; component extends Gradio's native components.
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
gradio_imageslider — pip install gradio_imageslider · libregistry