File size: 684 Bytes
93b20cc
 
d7fad04
 
 
 
 
 
93b20cc
d7fad04
 
 
 
394ae66
 
 
d7fad04
 
 
 
 
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 create_welcome_letter(name, email, favorite_color):
    # Create a welcome letter using the provided data
    return f"Welcome {name}!\n\n" \
           f"We're excited to have you join us. We have your email as {email}, " \
           f"and we see that your favorite color is {favorite_color}. " \
           f"We hope you enjoy your time with us!"

# Define the interface with multiple inputs
demo = gr.Interface(
    fn=create_welcome_letter,
    inputs=[
gr.Textbox(label="Name", value="Alex Thompson"),
gr.Textbox(label="Email", value="[email protected]"),
gr.Textbox(label="Favorite Color", value="Blue")
    ],
    outputs="text"
)

demo.launch()