Spaces:
Sleeping
Sleeping
import gradio as gr | |
import sklearn | |
# Step 3.1: Define a simple "Hello World" function | |
# requirement: input is text, output is text | |
def greet(name): | |
return "Hello " + name + "!!" | |
# Step 3.2: Define the input component (text style) and output component (text style) to create a simple GUI | |
import gradio as gr | |
input_module = gr.inputs.Textbox(label = "Input Text") | |
output_module = gr.outputs.Textbox(label = "Output Text") | |
# Step 3.3: Put all three component together into the gradio's interface function | |
gr.Interface(fn=greet, inputs=input_module, outputs=output_module).launch() | |