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

gr.Image.clear() does not invoke function #5548

Closed
1 task done
stefanengelmann opened this issue Sep 14, 2023 · 0 comments · Fixed by #5587
Closed
1 task done

gr.Image.clear() does not invoke function #5548

stefanengelmann opened this issue Sep 14, 2023 · 0 comments · Fixed by #5587
Assignees
Labels
bug Something isn't working 🖼️ image Image component
Milestone

Comments

@stefanengelmann
Copy link

Describe the bug

The gradio.Image.clear event listener does not invoke the callable function. According to the documentation, the listener should be triggered when the user clears the component using the X button for the component, but nothing happens

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():
        text = gr.Textbox() 
    with gr.Row():
        input_img = gr.Image(
            label="Input",
            tool='sketch',
            height=600,
            width=600,
        )
    
    input_img.clear(fn=lambda: gr.Textbox.update(value='Image was cleared'),inputs=None,outputs=text)

demo.launch(height=1024)

Screenshot

No response

Logs

No response

System Info

Gradio version 3.44.1

Severity

Blocking usage of gradio

@stefanengelmann stefanengelmann added the bug Something isn't working label Sep 14, 2023
@stefanengelmann stefanengelmann changed the title gr.Image.clear() gr.Image.clear() does not invoke function Sep 14, 2023
@abidlabs abidlabs modified the milestones: website-4.0, 4.0 Sep 14, 2023
@abidlabs abidlabs added the 🖼️ image Image component label Sep 14, 2023
@dawoodkhan82 dawoodkhan82 self-assigned this Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🖼️ image Image component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants