shnippi commited on
Commit
fbe93da
·
1 Parent(s): a5d769d

some additions

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -6,7 +6,7 @@ import requests
6
 
7
  # Nosey fucker arent you :)
8
 
9
- def email(linkedin_url, description_of_what_you_are_selling, description_of_who_you_are, type_of_email = ""):
10
 
11
  human_url = os.environ["HUMAN_URL"]
12
  model_url = os.environ["MODEL_URL"]
@@ -57,9 +57,14 @@ def email(linkedin_url, description_of_what_you_are_selling, description_of_who_
57
 
58
  # write the mail
59
 
 
 
 
 
 
60
  data = {
61
  "model": os.environ["MODEL_NAME"],
62
- "prompt": "now write me a" + type_of_email + "cold outreach email to this person that is highly personalized with the following information: " + summary + " the email should be about selling " + description_of_what_you_are_selling + "The email is from " + description_of_who_you_are + " .Don't use placeholders.",
63
  "temperature": 0,
64
  "max_tokens": 300
65
  }
@@ -74,7 +79,7 @@ def email(linkedin_url, description_of_what_you_are_selling, description_of_who_
74
  print("Request failed with status code:", response.status_code)
75
  return "Request failed with status code:", response.status_code
76
 
77
- return text
78
 
79
  demo = gr.Interface(
80
  email,
@@ -83,6 +88,7 @@ demo = gr.Interface(
83
  gr.Textbox(lines=1, label="Description of what you are selling (Name, Product, Service))"),
84
  gr.Textbox(lines=1, label="Description of who you are (Name, Company, Position))"),
85
  gr.Textbox(lines=1, label="(Optional) Describe the style of the email (funny, formal, short, long))"),
 
86
  ],
87
  gr.Textbox(lines=15, placeholder="Name Here...", label="Output"),
88
  title="LinkedIn Email Generai-tor",
 
6
 
7
  # Nosey fucker arent you :)
8
 
9
+ def email(linkedin_url, description_of_what_you_are_selling = "Generai, a flowchart tool to easily build and understand modern ML applications", description_of_who_you_are = "Jan Schnyder, Co-Founder of Generai", type_of_email = "", calendly_link = ""):
10
 
11
  human_url = os.environ["HUMAN_URL"]
12
  model_url = os.environ["MODEL_URL"]
 
57
 
58
  # write the mail
59
 
60
+ prompt = "now write me a" + type_of_email + "cold outreach email to this person that is highly personalized with the following information: " + summary + " the email should be about selling " + description_of_what_you_are_selling + "The email is from " + description_of_who_you_are + " .Don't use placeholders."
61
+
62
+ if calendly_link != "":
63
+ prompt = prompt + "The person can schedule a call here: " + calendly_link
64
+
65
  data = {
66
  "model": os.environ["MODEL_NAME"],
67
+ "prompt": prompt,
68
  "temperature": 0,
69
  "max_tokens": 300
70
  }
 
79
  print("Request failed with status code:", response.status_code)
80
  return "Request failed with status code:", response.status_code
81
 
82
+ return text + " \n\n - " + "P.S: This email was generated using our tool ;) " + "https://flow.generai.art/"
83
 
84
  demo = gr.Interface(
85
  email,
 
88
  gr.Textbox(lines=1, label="Description of what you are selling (Name, Product, Service))"),
89
  gr.Textbox(lines=1, label="Description of who you are (Name, Company, Position))"),
90
  gr.Textbox(lines=1, label="(Optional) Describe the style of the email (funny, formal, short, long))"),
91
+ gr.Textbox(lines=1, label="(Optional) Add your Calendly link here")
92
  ],
93
  gr.Textbox(lines=15, placeholder="Name Here...", label="Output"),
94
  title="LinkedIn Email Generai-tor",