saas0 / app.py
rajkr's picture
initial commit
355c818 verified
raw
history blame
1.58 kB
import gradio as gr
# Define a function to handle the form submission
def submit_form(name, email, company, message):
# For demonstration, we'll just return a confirmation message
return f"Thank you, {name} from {company}! Your message has been sent."
# Create the Gradio app
with gr.Blocks() as demo:
# Add a title and a description
gr.Markdown("# Welcome to Our SaaS Platform")
gr.Markdown("## Contact Us for More Information")
# Create a form layout
with gr.Row():
with gr.Column():
name = gr.Textbox(label="Name", placeholder="Enter your name")
email = gr.Textbox(label="Email", placeholder="Enter your email")
company = gr.Textbox(label="Company", placeholder="Enter your company name")
message = gr.Textbox(label="Message", placeholder="Enter your message", lines=4)
submit_btn = gr.Button("Submit")
with gr.Column():
# Add a section for additional information
gr.Markdown("### About Us")
gr.Markdown("We are a leading SaaS company providing innovative solutions to businesses of all sizes.")
gr.Markdown("### Features")
gr.Markdown("- Feature 1: Description of feature 1")
gr.Markdown("- Feature 2: Description of feature 2")
gr.Markdown("- Feature 3: Description of feature 3")
# Define the form submission event
submit_btn.click(fn=submit_form, inputs=[name, email, company, message], outputs=gr.Textbox(label="Confirmation"))
# Launch the app
demo.launch(show_error=True)