Input event in gr.Dataframe is also triggered at function updates and at app start
Opened this issue · 0 comments
bergerchris commented
Describe the bug
The input event of the dataframe should only be triggered, when the user makes inputs but it is also triggered at app startup and when a function makes changes.
Have you searched existing issues? 🔎
- I have searched and found no existing issues
Reproduction
import gradio as gr
def trigger():
return "TRIGGER"
def change_df():
return [['INPUT']]
with gr.Blocks() as demo:
dataframe = gr.Dataframe(label="Name", interactive=True)
textbox = gr.Textbox(label="Output Box", interactive=True)
button = gr.Button('Change Dataframe')
dataframe.input(fn=trigger, outputs=textbox)
button.click(fn=change_df, outputs=dataframe)
if __name__ == "__main__":
demo.launch()
Screenshot
No response
Logs
No response
System Info
Example from Gradio Playground
Severity
I can work around it