Spaces:
Running
Running
Update groq_api.py
Browse files- groq_api.py +6 -4
groq_api.py
CHANGED
@@ -5,10 +5,12 @@ import requests
|
|
5 |
|
6 |
GROQ_API_KEY = "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"
|
7 |
|
8 |
-
def summarize_match(job_description, cv_names):
|
9 |
if not GROQ_API_KEY:
|
10 |
return "❌ GROQ_API_KEY not set."
|
11 |
|
|
|
|
|
12 |
prompt = f"""
|
13 |
You are an AI recruiter assistant.
|
14 |
|
@@ -17,10 +19,10 @@ A company has the following job description:
|
|
17 |
{job_description}
|
18 |
---
|
19 |
|
20 |
-
Here are the
|
21 |
-
{
|
22 |
|
23 |
-
|
24 |
"""
|
25 |
|
26 |
try:
|
|
|
5 |
|
6 |
GROQ_API_KEY = "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"
|
7 |
|
8 |
+
def summarize_match(job_description, cv_names, cv_snippets):
|
9 |
if not GROQ_API_KEY:
|
10 |
return "❌ GROQ_API_KEY not set."
|
11 |
|
12 |
+
cv_info = "\n\n".join([f"{cv_names[i]}:\n{cv_snippets[i]}" for i in range(len(cv_names))])
|
13 |
+
|
14 |
prompt = f"""
|
15 |
You are an AI recruiter assistant.
|
16 |
|
|
|
19 |
{job_description}
|
20 |
---
|
21 |
|
22 |
+
Here are the top 3 candidate CVs (partial text):
|
23 |
+
{cv_info}
|
24 |
|
25 |
+
Based on the job description and CV content, summarize why these candidates are relevant.
|
26 |
"""
|
27 |
|
28 |
try:
|