gradio
gradio copied to clipboard
Using gr.Examples and gr.Gallery at the same time introduces display problem on component gr.Examples
Describe the bug
Using gr.Examples and gr.Gallery at the same time introduces display problem on component gr.Examples
gr.Examples shows [object Object], which is a problem. Click gr.Examples works very well, so I believe could be something wrong on display side.
Tried update gradio to 4.25, and the component of gr.Examples looks like crash.
Have you searched existing issues? 🔎
- [X] I have searched and found no existing issues
Reproduction
import gradio as gr
with gr.Blocks(title="DEMO", theme=gr.themes.Default()) as demo:
imagebox = gr.Gallery(label="Upload Images", show_label=True, type="image")
textbox = gr.Textbox(show_label=False, placeholder="Enter text and press ENTER", container=False)
gr.Examples(examples=[
[["assets/hongqi.jpeg"], "What brand is this car?"],
[["assets/white_bus.jpeg"], "Replace the white bus with su7."],
[[("assets/img1.jpg", "bottle1"),("assets/img2.jpg", "bottle2")], "There is one empty bottle in two images."],
[["assets/harry.jpeg"], "Tag the player of Fantastic Beasts"],
],
inputs=[imagebox, textbox])
demo.launch()
Screenshot
Logs
No response
System Info
Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 4.19.2
gradio_client version: 0.10.1
------------------------------------------------
gradio dependencies in your environment:
aiofiles: 23.2.1
altair: 5.2.0
fastapi: 0.110.0
ffmpy: 0.3.2
gradio-client==0.10.1 is not installed.
httpx: 0.27.0
huggingface-hub: 0.20.3
importlib-resources: 6.1.2
jinja2: 3.1.2
markupsafe: 2.1.3
matplotlib: 3.8.3
numpy: 1.26.3
orjson: 3.9.15
packaging: 23.2
pandas: 2.2.0
pillow: 10.2.0
pydantic: 2.6.2
pydub: 0.25.1
python-multipart: 0.0.9
pyyaml: 6.0.1
ruff: 0.2.2
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.9.0
typing-extensions: 4.8.0
uvicorn: 0.27.1
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.
gradio_client dependencies in your environment:
fsspec: 2024.2.0
httpx: 0.27.0
huggingface-hub: 0.20.3
packaging: 23.2
typing-extensions: 4.8.0
websockets: 11.0.3
Severity
I cannot work around it