Spaces:
Sleeping
Sleeping
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 |