Spaces:
Sleeping
Sleeping
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() |