demo-3-25 / app.py
riley-wilson's picture
Create app.py
b1afe62 verified
raw
history blame contribute delete
386 Bytes
import gradio as gr
def greet(name):
return "Hello" + name + "!"
with gr.Blocks() as demo:
name = gr.Textbox(label = "Please enter your name below:")
output = gr.Textbox(label = "Output")
greet_button = gr.Button("Process")
greet_button.click(fn = greet, inputs = name, outputs = output)
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()