hello / app.py
Ariel Gamino
Adding Hello app
8e9c6d5
raw
history blame contribute delete
500 Bytes
import gradio as gr
# Define a simple "Hello World" function
def greet(name):
"""Return html with name and an image"""
html = f"""Hello <b>{name}</b>
<br>
<img src = http://cdn.loc.gov/service/pnp/highsm/28100/28167r.jpg>
"""
return html
with gr.Blocks() as demo:
name = gr.Textbox(label="Name")
output = gr.HTML(label="Output Box")
greet_btn = gr.Button("Greet")
greet_btn.click(fn=greet, inputs=name, outputs=output)
demo.launch()