Closed flacomalone closed 1 day ago
The slider component does not render the adjustable bar accent color accordingly. This just happens with negative data ranges, not with positive.
NOTICE: I'm using my own theme, but I don't think that might be the issue
Here's an examplee of a well rendering positive data range:
noise_threshold = gr.Slider( label="Silence threshold", value=40, minimum=0, maximum=1000, interactive=True )
And this is an example of exactly the same code but with a negative data range:
noise_threshold = gr.Slider( label="Silence threshold", value=-40, minimum=-100, maximum=0, interactive=True )
import gradio as gr with gr.Blocks() as demo: slider_positive = gr.Slider( label="Positive range", value=40, minimum=0, maximum=100, interactive=True ) slider_negative = gr.Slider( label="Negative range", value=-40, minimum=-100, maximum=0, interactive=True ) demo.queue() demo.launch()
No response
Gradio Environment Information: ------------------------------ Operating System: Linux gradio version: 5.5.0 gradio_client version: 1.4.2 ------------------------------------------------ gradio dependencies in your environment: aiofiles: 23.2.1 anyio: 4.6.2.post1 audioop-lts is not installed. fastapi: 0.115.5 ffmpy: 0.4.0 gradio-client==1.4.2 is not installed. httpx: 0.27.2 huggingface-hub: 0.26.2 jinja2: 3.1.4 markupsafe: 2.1.5 numpy: 2.1.3 orjson: 3.10.11 packaging: 24.2 pandas: 2.2.3 pillow: 11.0.0 pydantic: 2.9.2 pydub: 0.25.1 python-multipart==0.0.12 is not installed. pyyaml: 6.0.2 ruff: 0.7.4 safehttpx: 0.1.1 semantic-version: 2.10.0 starlette: 0.41.2 tomlkit==0.12.0 is not installed. typer: 0.13.0 typing-extensions: 4.12.2 urllib3: 2.2.3 uvicorn: 0.32.0 authlib; extra == 'oauth' is not installed. itsdangerous; extra == 'oauth' is not installed. gradio_client dependencies in your environment: fsspec: 2024.10.0 httpx: 0.27.2 huggingface-hub: 0.26.2 packaging: 24.2 typing-extensions: 4.12.2 websockets: 12.0
I can work around it
Thanks for reporting @flacomalone, we'll have a fix in soon
Describe the bug
The slider component does not render the adjustable bar accent color accordingly. This just happens with negative data ranges, not with positive.
Here's an examplee of a well rendering positive data range:
And this is an example of exactly the same code but with a negative data range:
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
I can work around it