File size: 386 Bytes
b1afe62 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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() |