job detail
Browse files
app.py
CHANGED
@@ -17,24 +17,38 @@ from dataclasses import dataclass
|
|
17 |
api_key = os.getenv("api_key")
|
18 |
|
19 |
data = []
|
|
|
20 |
|
21 |
|
22 |
model = GroqModel("llama3-groq-70b-8192-tool-use-preview", api_key = api_key)
|
23 |
|
24 |
async def resume_AI(data):
|
25 |
agent = Agent(model=model,
|
26 |
-
|
27 |
system_prompt=(
|
28 |
"You are an expert in making resume",
|
29 |
"Review this resume and identify areas for improvement in structure, content, and formatting. Suggest specific changes to make it more professional and effective.",
|
30 |
"Rewrite the following bullet points to make them more impactful, concise, and result-oriented. Use action verbs and quantify achievements wherever possible.",
|
31 |
"Review this resume for grammar, clarity, and conciseness. Suggest edits to improve readability and professionalism.",
|
32 |
-
"
|
|
|
|
|
|
|
33 |
)
|
34 |
|
35 |
)
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
st.markdown(result.data)
|
39 |
|
40 |
def extract_data(feed):
|
@@ -52,6 +66,7 @@ def ai_resume(data):
|
|
52 |
|
53 |
def main():
|
54 |
uploaded_file = st.file_uploader('Choose your .pdf file', type="pdf")
|
|
|
55 |
if uploaded_file is not None:
|
56 |
extract_data(uploaded_file)
|
57 |
binary_data = uploaded_file.getvalue()
|
|
|
17 |
api_key = os.getenv("api_key")
|
18 |
|
19 |
data = []
|
20 |
+
user_input = ""
|
21 |
|
22 |
|
23 |
model = GroqModel("llama3-groq-70b-8192-tool-use-preview", api_key = api_key)
|
24 |
|
25 |
async def resume_AI(data):
|
26 |
agent = Agent(model=model,
|
27 |
+
deps_type=str,
|
28 |
system_prompt=(
|
29 |
"You are an expert in making resume",
|
30 |
"Review this resume and identify areas for improvement in structure, content, and formatting. Suggest specific changes to make it more professional and effective.",
|
31 |
"Rewrite the following bullet points to make them more impactful, concise, and result-oriented. Use action verbs and quantify achievements wherever possible.",
|
32 |
"Review this resume for grammar, clarity, and conciseness. Suggest edits to improve readability and professionalism.",
|
33 |
+
"Optimize this resume with keywords and phrases relevant to specific job description from 'getJobDetail' to improve its chances of passing through Applicant Tracking Systems (ATS)",
|
34 |
+
"Revise this resume to align with the requirements of [specific job role] from 'getJobDetail' in [industry] from 'getJobDetail' . Highlight relevant skills, experiences, and achievements that match the job description.",
|
35 |
+
"Your answer should be a new and improve resume in markdown formate",
|
36 |
+
"Rewrite this resume to focus on transferable skills and experiences that would be relevant for transitioning to [new industry or role]."
|
37 |
)
|
38 |
|
39 |
)
|
40 |
|
41 |
+
@agent.tool
|
42 |
+
async def getJobDetail(ctx: RunContext) -> str:
|
43 |
+
|
44 |
+
"""
|
45 |
+
|
46 |
+
This method return job description
|
47 |
+
that resume needs to be update to
|
48 |
+
"""
|
49 |
+
return ctx.deps
|
50 |
+
|
51 |
+
result = agent.run_sync(user_prompt=f"Improve this resume: {data}",deps=user_input)
|
52 |
st.markdown(result.data)
|
53 |
|
54 |
def extract_data(feed):
|
|
|
66 |
|
67 |
def main():
|
68 |
uploaded_file = st.file_uploader('Choose your .pdf file', type="pdf")
|
69 |
+
user_input = st.text_input(label="Enter job detail")
|
70 |
if uploaded_file is not None:
|
71 |
extract_data(uploaded_file)
|
72 |
binary_data = uploaded_file.getvalue()
|