niratpatel commited on
Commit
a718402
·
verified ·
1 Parent(s): 8c5c24b

Added Resume Maker

Browse files
Files changed (1) hide show
  1. app.py +49 -10
app.py CHANGED
@@ -9,15 +9,54 @@ from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
- def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
13
  #Keep this format for the description / args / args description but feel free to modify the tool
14
- """A tool that does nothing yet
15
  Args:
16
- arg1: the first argument
17
- arg2: the second argument
18
  """
19
- return "What magic will you build ?"
 
 
 
 
 
 
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  @tool
22
  def get_current_time_in_timezone(timezone: str) -> str:
23
  """A tool that fetches the current local time in a specified timezone.
@@ -40,10 +79,10 @@ final_answer = FinalAnswerTool()
40
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
41
 
42
  model = HfApiModel(
43
- max_tokens=2096,
44
- temperature=0.5,
45
- model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
46
- custom_role_conversions=None,
47
  )
48
 
49
 
@@ -55,7 +94,7 @@ with open("prompts.yaml", 'r') as stream:
55
 
56
  agent = CodeAgent(
57
  model=model,
58
- tools=[final_answer], ## add your tools here (don't remove final answer)
59
  max_steps=6,
60
  verbosity_level=1,
61
  grammar=None,
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def resume_optimizer_tool((resume_text:str, jd_text:int)-> str: #it's import to specify the return type
13
  #Keep this format for the description / args / args description but feel free to modify the tool
14
+ """Uses an LLM to optimize the resume based on the Job Description
15
  Args:
16
+ resume_text: User's resume in plaintext
17
+ jd_text: Job Description in plaintext
18
  """
19
+ return f"""
20
+ [TASK]
21
+ You are a Career Advisor. Your job is to:
22
+ 1. Compare the resume and job description
23
+ 2. Identify skill/terminology gaps
24
+ 3. Suggest improvements to align resume better
25
+ 4. Rewrite key sections if needed using professional, clear language.
26
 
27
+ [RESUME]:
28
+ {resume_text}
29
+
30
+ [JOB DESCRIPTION]:
31
+ {jd_text}
32
+
33
+ OUTPUT FORMAT]
34
+ - Missing Keywords:
35
+ - Suggested Additions:
36
+ - Improved Resume Section:
37
+
38
+ Start with Missing Keywords.
39
+ """
40
+
41
+ @tool
42
+ def project_suggestor(domain: str) -> str:
43
+ """
44
+ A tool that suggests good resume projects based on the domain. Uses an LLM to suggest high-impact AI/ML project ideas for any domain.
45
+ Args:
46
+ domain: The domain of interest (e.g., 'mental health', 'agriculture', 'ecommerce', etc.)
47
+ """
48
+ return f"""
49
+ [TASK]
50
+ You are an AI mentor. Suggest 3 innovative, resume-grade AI/ML project ideas in the domain of: {domain}
51
+
52
+ The projects should:
53
+ - Be feasible for a single developer or student
54
+ - Include a practical use-case
55
+ - Be unique, not generic
56
+
57
+ Output in numbered list.
58
+ """
59
+
60
  @tool
61
  def get_current_time_in_timezone(timezone: str) -> str:
62
  """A tool that fetches the current local time in a specified timezone.
 
79
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
80
 
81
  model = HfApiModel(
82
+ max_tokens=2096,
83
+ temperature=0.5,
84
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
85
+ custom_role_conversions=None,
86
  )
87
 
88
 
 
94
 
95
  agent = CodeAgent(
96
  model=model,
97
+ tools=[final_answer, resume_optimizer_tool, project_suggestor], ## add your tools here (don't remove final answer)
98
  max_steps=6,
99
  verbosity_level=1,
100
  grammar=None,