huggingface_hub==0.36.0 import re import gradio as gr KEYWORDS = [ "COBOL", "JCL", "DB2", "SQL", "CICS", "VSAM", "Python", "Java", "JavaScript", "AWS", "Azure", "Git", "GitHub", "REST API", "API", "Linux", "Docker", "Mainframe", "Automation", "Selenium", "Excel", "Power BI", "AI", "Machine Learning" ] def analyze(text): text = (text or "").strip() if not text: return "## Please paste a job description first." found = [] for keyword in KEYWORDS: if re.search( r"\b" + re.escape(keyword) + r"\b", text, re.IGNORECASE ): found.append(keyword) if found: skills = "\n".join( f"- {skill}" for skill in found ) else: skills = "- No recognized technical skills found." questions = [] for skill in found[:8]: questions.append( f"- Explain your practical experience with **{skill}**." ) if not questions: questions = [ "- Tell me about your most relevant technical project.", "- Describe a technical problem you investigated and resolved.", "- Which skills in this job description are strongest for you?", "- Which required skill are you currently improving?" ] question_text = "\n".join(questions) checklist = """ - Match your resume wording to your genuine skills. - Prepare one project example for the main technical requirements. - Review the technical skills identified above. - Prepare examples using the STAR method. - Identify missing skills that should be learned or strengthened. """ return f""" # 🧠 Job Description Analysis ## Detected Technical Skills {skills} ## Interview Preparation Questions {question_text} ## Preparation Checklist {checklist} --- ### Note This version performs local keyword-based analysis and does not require an API key. """ demo = gr.Interface( fn=analyze, inputs=gr.Textbox( lines=18, label="Paste Job Description", placeholder="Paste the complete job description here..." ), outputs=gr.Markdown(label="Analysis"), title="🧠 AI Job Description Analyzer", description=( "Analyze a job description, identify technical skills, " "generate interview questions and create a preparation checklist." ) ) demo.launch()