def generate_analysis(jd_data,resume_data,pipe): # jd_text = truncate_text(jd_data) prompt = f""" Analyze the following resume and job description. Provide a detailed analysis of the match, including strengths, weaknesses, and an overall fit score between 0 and 1. Resume: {resume_data} Job Description: {jd_data} Provide your analysis in the following format: Score: [score between 0 and 1 (for resemblance of resume with job description)] Analysis: [Your detailed analysis in point-wise] Weaknesses:[weaknesses of the resume according to Job Description in point-wise] Strengths:[Strengths of the resume according to Job Description in point-wise] Areas of non-Alignment: [Areas of Alignment where the candidate is missing according to job description in point-wise] Areas of Alignment: [Areas of Alignment where the candidate is matching according to job description in point-wise] **PLEASE USE HEADINGS Score,Analysis,Weaknesses,Strengths,Areas of Alignment as it is** """ response = pipe(prompt,max_new_tokens=5000, do_sample=True, temperature=0.7) return response, prompt # return prompt