Great work!
#1
by
merve
HF staff
- opened
Hello @MuskanMjn thanks a lot for the demo! I feel like it's better to have an event listener instead of a button. e.g. call .change() on radio button and sliders to let the outputs change every time there's a change in inputs. See an example below.
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()
Hi Merve! Thank you for the feedback. ๐ค
Made the changes!