siddhartharya commited on
Commit
f7c45b5
·
verified ·
1 Parent(s): 63c1516

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -114,7 +114,7 @@ class AutonomousEmailAgent:
114
  def format_email(self, llm_response):
115
  # Clean and format the email
116
  lines = [line.strip() for line in llm_response.split("\n") if line.strip()]
117
- formatted_email = "\n".join(lines)
118
 
119
  # Truncate the email if it exceeds the word limit
120
  words = formatted_email.split()
@@ -122,6 +122,13 @@ class AutonomousEmailAgent:
122
  truncated_email = " ".join(words[:self.word_limit]) + "..."
123
  formatted_email = truncated_email
124
 
 
 
 
 
 
 
 
125
  # Prepare the signature
126
  signature = (
127
  f"Best regards,\n"
@@ -135,7 +142,7 @@ class AutonomousEmailAgent:
135
  if "Best regards" in formatted_email:
136
  formatted_email = formatted_email.split("Best regards")[0].strip()
137
 
138
- return f"{formatted_email}\n\n{signature}"
139
 
140
  # Gradio UI setup remains unchanged
141
  def gradio_ui():
 
114
  def format_email(self, llm_response):
115
  # Clean and format the email
116
  lines = [line.strip() for line in llm_response.split("\n") if line.strip()]
117
+ formatted_email = "\n\n".join(lines)
118
 
119
  # Truncate the email if it exceeds the word limit
120
  words = formatted_email.split()
 
122
  truncated_email = " ".join(words[:self.word_limit]) + "..."
123
  formatted_email = truncated_email
124
 
125
+ # Add the closing section with a call to action
126
+ closing_section = (
127
+ "\n\nI would appreciate the opportunity to discuss how my background, skills, and passion align with the goals "
128
+ "of 100xEngineers. I am eager to contribute to your mission and support the development of future leaders in technology.\n\n"
129
+ "Thank you for considering my application. I look forward to the possibility of discussing this role further.\n"
130
+ )
131
+
132
  # Prepare the signature
133
  signature = (
134
  f"Best regards,\n"
 
142
  if "Best regards" in formatted_email:
143
  formatted_email = formatted_email.split("Best regards")[0].strip()
144
 
145
+ return f"{formatted_email}{closing_section}\n{signature}"
146
 
147
  # Gradio UI setup remains unchanged
148
  def gradio_ui():