Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging in an image a second time will not replace the original image, it will open in a new tab #10281

Open
1 task done
Dazidingo opened this issue Jan 3, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Dazidingo
Copy link

Describe the bug

Dragging in an image a second time will not replace the original image, it will open in a new tab

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

    
with gr.Blocks() as demo:  
    with gr.Row():
        input_image = gr.Image(
                        label="输入图像", 
                        type="pil",
                        height=600,
                        width=400,
                        interactive=True
                    )

if __name__ == "__main__":
    demo.launch(
        server_name="0.0.0.0",
        server_port=37865
    )

Screenshot

No response

Logs

No response

System Info

gradio                       5.6.0
gradio_client                1.4.3

Severity

I can work around it

@Dazidingo Dazidingo added the bug Something isn't working label Jan 3, 2025
@abidlabs
Copy link
Member

abidlabs commented Jan 4, 2025

Not sure if this intentional or not, cc @hannahblair @pngwn but it seems reasonable to support

@Dazidingo
Copy link
Author

When I use gradio 4.x.x I can replace the image with the newly dragged in image when it already exists in the gr.Image() interactive interface, but with gradio 5.x.x the newly dragged in image will be displayed in the new tab when it already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants