Spaces:
Sleeping
Sleeping
File size: 592 Bytes
18529ff 6ca2393 18529ff 6ca2393 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
def greet(text):
# This function takes the user input and returns "Hello " + that input
return "Hello " + text
# Build the Gradio interface
iface = gr.Interface(
fn=greet, # the function to run
inputs=gr.Textbox( # a textbox for user input
label="Enter some text"
),
outputs=gr.Textbox( # a textbox for the output
label="Greeting"
),
title="Simple Hello App",
description="Type anything and I'll say hello to it!"
)
if __name__ == "__main__":
iface.launch() # launch() starts the web UI |