pleabargain commited on
Commit
d7fad04
·
verified ·
1 Parent(s): 93b20cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -4
app.py CHANGED
@@ -1,7 +1,21 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ def create_welcome_letter(name, email, favorite_color):
4
+ # Create a welcome letter using the provided data
5
+ return f"Welcome {name}!\n\n" \
6
+ f"We're excited to have you join us. We have your email as {email}, " \
7
+ f"and we see that your favorite color is {favorite_color}. " \
8
+ f"We hope you enjoy your time with us!"
9
 
10
+ # Define the interface with multiple inputs
11
+ demo = gr.Interface(
12
+ fn=create_welcome_letter,
13
+ inputs=[
14
+ gr.inputs.Textbox(label="Name"),
15
+ gr.inputs.Textbox(label="Email"),
16
+ gr.inputs.Textbox(label="Favorite Color")
17
+ ],
18
+ outputs="text"
19
+ )
20
+
21
+ demo.launch()