Team Ai
Apppublic

EuroPython2022/example-hello

sourceHugging Faceupdated 4y agoView on Hugging Face
1likes
app.py21 linesDownload Raw Back to root
1import gradio as gr2 3def update(name):4    return f"Welcome to EuroPython 2022, {name}!"5 6demo = gr.Blocks()7 8with demo:9    gr.Markdown(10    """11    # Hello World!12    Start typing below to see the output.13    """)14    inp = gr.Textbox(placeholder="What is your name?")15    out = gr.Textbox()16 17    inp.change(fn=update, 18               inputs=inp, 19               outputs=out)20 21demo.launch()