Sujithanumala commited on
Commit
971eb6e
·
verified ·
1 Parent(s): 51417aa

Added regex matching + corrected links in the header section

Browse files
Files changed (1) hide show
  1. resume_tools.py +9 -7
resume_tools.py CHANGED
@@ -5,6 +5,7 @@ import os
5
  from typing import List
6
  from utils import CURRENT_RESUME_LATEX
7
  import os
 
8
  import json
9
  from dotenv import load_dotenv
10
 
@@ -32,12 +33,12 @@ def header_details(name: str, mobile_number: str, email_id: str, linkedin_profil
32
  \begin{center}
33
  \textbf{\Huge \scshape """
34
  header_latex+= name + r"""} \\ \vspace{1pt}
35
- \small""" + mobile_number + r""" $|$ \href{mailto:[email protected]}{\underline{"""
36
  header_latex+= email_id + r"""}} $|$
37
- \href{https://linkedin.com/in/...}{\underline{"""
38
- header_latex+=linkedin_profile_link + r"""}} $|$
39
- \href{https://github.com/...}{\underline{"""
40
- header_latex+=github_link + r"""}}
41
  \end{center}
42
 
43
 
@@ -283,10 +284,11 @@ def create_resume_agent(prompt: str):
283
  tools = [header_details,professional_summary,professional_experience,projects,skills,Education,achievements],
284
  model = model
285
  )
286
- print(resume_agent)
287
  resume_agent.run(prompt)
288
  global CURRENT_RESUME_LATEX
289
- print(CURRENT_RESUME_LATEX)
 
290
  return CURRENT_RESUME_LATEX
291
  except Exception as e:
292
  return e
 
5
  from typing import List
6
  from utils import CURRENT_RESUME_LATEX
7
  import os
8
+ import re
9
  import json
10
  from dotenv import load_dotenv
11
 
 
33
  \begin{center}
34
  \textbf{\Huge \scshape """
35
  header_latex+= name + r"""} \\ \vspace{1pt}
36
+ \small""" + mobile_number + r""" $|$ \href{mailto:""" + email_id + r"""}{\underline{"""
37
  header_latex+= email_id + r"""}} $|$
38
+ \href{""" + linkedin_profile_link + r"""}{\underline{"""
39
+ header_latex+= r"""linkedin}} $|$
40
+ \href{""" + github_link + r"""}{\underline{"""
41
+ header_latex+=r"""github}}
42
  \end{center}
43
 
44
 
 
284
  tools = [header_details,professional_summary,professional_experience,projects,skills,Education,achievements],
285
  model = model
286
  )
287
+ # print(resume_agent)
288
  resume_agent.run(prompt)
289
  global CURRENT_RESUME_LATEX
290
+ # print(CURRENT_RESUME_LATEX)
291
+ CURRENT_RESUME_LATEX = re.sub(r'\bextbf\s*{(.*?)}', r'\\textbf{\1}', CURRENT_RESUME_LATEX)
292
  return CURRENT_RESUME_LATEX
293
  except Exception as e:
294
  return e