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

MultimodalTextbox interactive=False doesn't work with the submit button #9967

Open
1 task done
sthemeow opened this issue Nov 16, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@sthemeow
Copy link
Contributor

sthemeow commented Nov 16, 2024

Describe the bug

When setting interactive=False with MultimodalTextbox, it doesn't disable the submit button.
The text entry and image upload button are disabled so the content cannot be changed, but the submission can still take place.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr


def greet(a, c):
    return gr.MultimodalTextbox(interactive=False), a, c+1


with gr.Blocks() as demo:
    a = gr.MultimodalTextbox(interactive=True, show_label=False) 
    b = gr.Textbox(interactive=False, show_label=False)
    c = gr.Number(interactive=False, show_label=False) 
    a.submit(fn=greet, inputs=[a, c], outputs=[a, b, c])

if __name__ == "__main__":
    demo.launch()

Screenshot

image
image
image

I can still click the submit button multiple times after it is set to be non-interactive.

Logs

No response

System Info

Gradio Playground

Severity

I can work around it

@sthemeow sthemeow added the bug Something isn't working label Nov 16, 2024
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

1 participant