File size: 1,085 Bytes
555655f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
def generate_email(recipient_name, recipient_role, company_name, industry, personal_details):
return f"Hello {recipient_name},\n\nI hope this email finds you well. My name is Niket, and I'm reaching out to you as an Intern at 100x. I noticed that your company, {company_name}, is involved in the {industry} sector, and I believe we could explore potential collaboration. Would you be available for a coffee chat next week?\n\nLooking forward to hearing from you!\n\nBest,\nNiket"
with gr.Blocks() as demo:
gr.Markdown("# EmailGenie - Your AI Email Generator")
recipient_name = gr.Textbox(label="Recipient's Name")
recipient_role = gr.Textbox(label="Recipient's Role")
company_name = gr.Textbox(label="Company Name")
industry = gr.Textbox(label="Industry")
output = gr.Textbox(label="Generated Email", interactive=False)
generate_button = gr.Button("Generate Email")
generate_button.click(fn=generate_email, inputs=[recipient_name, recipient_role, company_name, industry], outputs=output)
demo.launch(share=True)
|