Custom Components GalleryNEW
ExploreCustom Components GalleryNEW
ExploreNew to Gradio? Start here: Getting Started
See the Release History
To install Gradio from main, run the following command:
pip install https://gradio-builds.s3.amazonaws.com/661938e31f0d6b76eaed4cf086ee88ed37371c4a/gradio-4.32.2-py3-none-any.whl
*Note: Setting share=True
in
launch()
will not work.
gradio.EventData(ยทยทยท)
table = gr.Dataframe([[1, 2, 3], [4, 5, 6]])
gallery = gr.Gallery([("cat.jpg", "Cat"), ("dog.jpg", "Dog")])
textbox = gr.Textbox("Hello World!")
statement = gr.Textbox()
def on_select(evt: gr.SelectData): # SelectData is a subclass of EventData
return f"You selected {evt.value} at {evt.index} from {evt.target}"
table.select(on_select, None, statement)
gallery.select(on_select, None, statement)
textbox.select(on_select, None, statement)
Parameter | Description |
---|---|
target Block | None required | The target object that triggered the event. Can be used to distinguish if multiple components are bound to the same listener. |