WebashalarForML commited on
Commit
f08d659
·
verified ·
1 Parent(s): e14a323

Update utils/mistral.py

Browse files
Files changed (1) hide show
  1. utils/mistral.py +5 -4
utils/mistral.py CHANGED
@@ -13,7 +13,8 @@ from utils.spacy import Parser_from_model
13
  load_dotenv()
14
 
15
  # Authenticate with Hugging Face
16
- HFT = os.getenv('HF_TOKEN')
 
17
  if not HFT:
18
  raise ValueError("Hugging Face token is not set in environment variables.")
19
  client = InferenceClient(model="mistralai/Mistral-Nemo-Instruct-2407", token=HFT)
@@ -56,11 +57,11 @@ def Model_ProfessionalDetails_Output(resume, client):
56
  "projects": ["Extract all projects names or titles mentioned in the resume."],
57
  "projects_experience": ["Summarize overall project experiences, providing a brief description of each project as detailed in the resume."],
58
  "experience": ["Calculate total professional work experience in years and months based on the resume."],
59
- "certifications": ["Extract and list all certifications obtained as stated in the resume."],
60
- "roles": ["Include the names of all job titles or roles held as indicated in the resume."],
61
  "qualifications": ["List and Extract all educational qualifications, including degrees (e.g., BBA, MBA), their full forms, and associated levels (e.g., undergraduate, postgraduate) from resume. If none are found, return []."],
62
  "university": ["List and Extract the name of the University, College, or Institute attended, based on the resume. If not found, return []."],
63
- "courses": ["Extract the names of completed courses or based on the resume. If none are found, return []."]
64
  }}
65
  }}
66
  output:
 
13
  load_dotenv()
14
 
15
  # Authenticate with Hugging Face
16
+ HFT = os.getenv('HF_TOKEN')
17
+
18
  if not HFT:
19
  raise ValueError("Hugging Face token is not set in environment variables.")
20
  client = InferenceClient(model="mistralai/Mistral-Nemo-Instruct-2407", token=HFT)
 
57
  "projects": ["Extract all projects names or titles mentioned in the resume."],
58
  "projects_experience": ["Summarize overall project experiences, providing a brief description of each project as detailed in the resume."],
59
  "experience": ["Calculate total professional work experience in years and months based on the resume."],
60
+ "certifications": ["List and Extract all certifications mentioned in the resume."],
61
+ "roles": ["List and Extract the names of all job titles or roles mentioned in the resume."],
62
  "qualifications": ["List and Extract all educational qualifications, including degrees (e.g., BBA, MBA), their full forms, and associated levels (e.g., undergraduate, postgraduate) from resume. If none are found, return []."],
63
  "university": ["List and Extract the name of the University, College, or Institute attended, based on the resume. If not found, return []."],
64
+ "courses": ["List and Extract the names of completed courses or based on the resume. If none are found, return []."]
65
  }}
66
  }}
67
  output: