TalentLensAI / crewai.py
Johnny
added app.py crewai.py database.py requirements.txt multi_agent folder
2600a8c
raw
history blame
1.14 kB
from crewai import Crew, Agent, Task
from huggingface_hub import InferenceClient
import os
HF_API_URL = "https://api-inference.huggingface.co/models/YOUR_MODEL"
HF_API_KEY = "your_api_key"
client = InferenceClient(token=HF_API_KEY)
class ResumeAgents:
@staticmethod
def parse_resume(resume_text):
"""Agent to extract key resume details"""
prompt = f"Extract skills, experience, and education from this resume:\n{resume_text}"
response = client.text_generation(prompt)
return response
@staticmethod
def rank_resume(resume_details, job_description):
"""Agent to rank the resume against the job description"""
prompt = f"Rank this resume based on the job description:\nJob: {job_description}\nResume: {resume_details}"
response = client.text_generation(prompt)
return response
@staticmethod
def recommend_candidates(resume_rankings):
"""Agent to recommend the best candidates"""
prompt = f"Recommend the top candidates based on rankings:\n{resume_rankings}"
response = client.text_generation(prompt)
return response