Small feedback :)
#1
by
merve
HF staff
- opened
Hello
@rashmi
๐ thanks a lot for this demo! I feel like it would be better to have an event listener here instead of the button click, as there's single slider, you can do so by removing button and calling slider.change()
and also have the plot right next to slider to save more Space. WDYT? See an example use of event listeners on second code block here:
import gradio as gr
def welcome(name):
return f"Welcome to Gradio, {name}!"
with gr.Blocks() as demo:
gr.Markdown(
"""
# Hello World!
Start typing below to see the output.
""")
inp = gr.Textbox(placeholder="What is your name?")
out = gr.Textbox()
inp.change(welcome, inp, out)
demo.launch()