Small feedback!
#1
by
merve
HF staff
- opened
Great work! I wanted to discuss if it would be cool to replace button with an event listener. Take a small look at the below example:
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()
instead of having a run_button.click()
, replace it with the radio_button.change()
What do you think?
I think it is a good idea! Thank you for your feedback ^^