Spaces:
Running
Running
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: | |
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 | |
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 | |
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 | |