File size: 462 Bytes
3064266
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
# This is a simple Gradio app that greets the user.
import gradio as gr

# Define a function that takes a name and returns a greeting.
def greet(name):
    return "Hello " + name + "!"

# Create a Gradio interface that takes a textbox input, runs it through the greet function, and returns output to a textbox.
demo = gr.Interface(fn=greet, inputs="textbox", outputs="textbox")

# Launch the interface.
if __name__ == "__main__":
    demo.launch(show_error=True)