hello_world / app.py
aliabd's picture
aliabd HF staff
Upload with huggingface_hub
d66f99e
raw
history blame
436 Bytes
# URL: https://huggingface.co/spaces/gradio/hello_world
# DESCRIPTION: The simplest possible Gradio demo. It wraps a 'Hello {name}!' function in an Interface that accepts and returns text.
import gradio as gr
# defining the core function
def greet(name):
return "Hello " + name + "!"
# defining a text-to-text interface
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
# launching the interface
demo.launch()