Spaces:
Sleeping
Sleeping
pleabargain
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,21 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
def
|
4 |
-
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
demo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|