aakash911/Lab04
0
1import gradio as gr2 3 4# Step 3.1: Define a simple "Hello World" function5# requirement: input is text, output is text6def greet(name):7 return "Hello " + name + "!!"8 9# Step 3.2: Define the input component (text style) and output component (text style) to create a simple GUI10import gradio as gr11input_module = gr.inputs.Textbox(label = "Input Text")12output_module = gr.outputs.Textbox(label = "Output Text")13 14# Step 3.3: Put all three component together into the gradio's interface function 15gr.Interface(fn=greet, inputs=input_module, outputs=output_module).launch()