siddhartharya commited on
Commit
6b437b1
·
verified ·
1 Parent(s): ccd361e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -13
app.py CHANGED
@@ -5,19 +5,20 @@ from groq import Groq
5
  # Initialize Groq client
6
  client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
7
 
8
- # System prompt with recipient's profile
9
  SYSTEM_PROMPT = """
10
- You are an AI assistant that generates personalized emails. The recipient is Siddhant Goswami, the Co-Founder 100x Engineers and a Generative AI Instructor
11
- He live in Bengaluru, Karnataka, India
12
- He is Currently building 100x Engineers.
13
- He has Built and scaled three products to seven figures.
14
- Scenes (acquired by Unacademy),
15
- Tapchief (acquired by Unacademy),
16
- Relevel
 
17
  """
18
 
19
  def generate_email(name, project, key_benefits):
20
- prompt = f"Generate an email to the person described in the system prompt. The email should be from {name}, about the project '{project}', and highlight the following key benefits: {key_benefits}"
21
 
22
  try:
23
  chat_completion = client.chat.completions.create(
@@ -35,14 +36,14 @@ def generate_email(name, project, key_benefits):
35
 
36
  # Create Gradio interface
37
  with gr.Blocks() as demo:
38
- gr.Markdown("# Email Generator")
39
- gr.Markdown("Generate a personalized email based on the given inputs.")
40
 
41
  with gr.Row():
42
  with gr.Column():
43
  name = gr.Textbox(label="Your Name", placeholder="Enter your name")
44
- project = gr.Textbox(label="Project Name", placeholder="Enter the project name")
45
- benefits = gr.Textbox(label="Key Benefits", placeholder="List key benefits, separated by commas")
46
  submit_btn = gr.Button("Generate Email")
47
 
48
  with gr.Column():
 
5
  # Initialize Groq client
6
  client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
7
 
8
+ # Updated System prompt with Siddhant Goswami's profile
9
  SYSTEM_PROMPT = """
10
+ You are an AI assistant that generates personalized emails. The recipient is Siddhant Goswami, the Co-Founder of 100x Engineers and a Generative AI Instructor.
11
+ He lives in Bengaluru, Karnataka, India.
12
+ He is currently building 100x Engineers.
13
+ He has built and scaled three products to seven figures:
14
+ - Scenes (acquired by Unacademy)
15
+ - Tapchief (acquired by Unacademy)
16
+ - Relevel
17
+ Your task is to create emails that would be relevant and engaging for someone with his background and current focus.
18
  """
19
 
20
  def generate_email(name, project, key_benefits):
21
+ prompt = f"Generate an email to Siddhant Goswami as described in the system prompt. The email should be from {name}, about the project '{project}', and highlight the following key benefits: {key_benefits}. Ensure the tone is professional yet engaging, and consider Siddhant's background in tech entrepreneurship and AI."
22
 
23
  try:
24
  chat_completion = client.chat.completions.create(
 
36
 
37
  # Create Gradio interface
38
  with gr.Blocks() as demo:
39
+ gr.Markdown("# AI Entrepreneur Email Composer")
40
+ gr.Markdown("Craft personalized emails to Siddhant Goswami, Co-Founder of 100x Engineers and Generative AI Instructor. Input your details, and our AI will generate a tailored message that resonates with his background in tech entrepreneurship and AI.")
41
 
42
  with gr.Row():
43
  with gr.Column():
44
  name = gr.Textbox(label="Your Name", placeholder="Enter your name")
45
+ project = gr.Textbox(label="Project Name", placeholder="Enter your project or company name")
46
+ benefits = gr.Textbox(label="Key Benefits", placeholder="List key benefits or points of interest, separated by commas")
47
  submit_btn = gr.Button("Generate Email")
48
 
49
  with gr.Column():