import gradio as gr from huggingface_hub import InferenceClient client = InferenceClient("Qwen/Qwen2.5-3B-Instruct") SYSTEM_PROMPT = """You are a brutally honest but helpful senior hiring manager with 15 years of experience. Your job is to tell candidates EXACTLY why they will be rejected — not a vague match score, but a specific, actionable rejection explanation. You must output your response in this exact structure: ## ❌ Why You Will Likely Be Rejected [2-3 specific, direct sentences about the core mismatch] ## 🔍 Top 3 Skill Gaps 1. [Gap 1 — specific technology or skill missing] 2. [Gap 2] 3. [Gap 3] ## 📂 Missing Projects/Experience - [What kind of project would fill this gap] - [Another project] - [Another project] ## 🔑 Missing Keywords (for ATS systems) [comma-separated list of keywords from the job description not present in the resume] ## 📅 30-Day Improvement Plan **Week 1:** [Specific action] **Week 2:** [Specific action] **Week 3:** [Specific action] **Week 4:** [Specific action — ideally a project to show] ## 💡 One Honest Verdict [One sentence: should they apply now, in 3 months, or pivot entirely?] Be specific. Name actual technologies. Do not be vague. Do not be encouraging unless there is a real reason to be.""" def analyze(resume_text, job_description): if not resume_text.strip() or not job_description.strip(): return "⚠️ Please paste both your resume and the job description." user_message = f"""Here is the candidate's resume: --- {resume_text} --- Here is the job description they want to apply to: --- {job_description} --- Tell them exactly why they will be rejected and what to do about it.""" response = client.chat_completion( messages=[ {"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": user_message} ], max_tokens=1024, temperature=0.7, ) return response.choices[0].message.content EXAMPLE_RESUME = """Name: Priya Sharma Education: M.S. Computer Science, 2024 Skills: Python, PyTorch, NLP, Transformers, BERT fine-tuning, HuggingFace, scikit-learn, pandas, numpy Projects: - Sentiment analysis model on Twitter data using BERT - Named Entity Recognition system for biomedical text - Research paper: "Improving low-resource NER with cross-lingual transfer" Experience: - ML Research Intern, university NLP lab (6 months) - TA for Introduction to Machine Learning course""" EXAMPLE_JD = """Senior ML Engineer — Infrastructure Company: CloudScale Inc. Requirements: - 3+ years deploying ML models at scale in production - Strong knowledge of Kubernetes, Docker, MLflow - Experience with distributed training (Horovod, DeepSpeed) - Familiarity with AWS SageMaker or GCP Vertex AI - Python, Go, or Rust for systems-level work - Experience with data pipelines: Spark, Kafka, Airflow - Nice to have: ONNX optimization, TensorRT, model quantization""" with gr.Blocks( theme=gr.themes.Soft(), title="Rejected Before Applying", css=""" .header { text-align: center; margin-bottom: 20px; } .warning-box { background: #fff3cd; border-left: 4px solid #ff6b35; padding: 12px; border-radius: 6px; } """ ) as demo: gr.HTML("""
Find out exactly why your resume won't make it — before you waste the application.
Powered by Qwen2.5-3B • No data stored • Brutal honesty guaranteed