#!/usr/bin/env python3 import gradio as gr import asyncio import os # Basic configuration OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY") SERPAPI_KEY = os.getenv("SERPAPI_KEY") FIRECRAWL_API_KEY = os.getenv("FIRECRAWL_API_KEY") def simple_analysis(resume_text: str, job_text: str) -> str: """Simple analysis without complex dependencies""" if not resume_text.strip(): return "āŒ Please provide your resume text." if not job_text.strip(): return "āŒ Please provide a job description or URL." # Basic analysis resume_words = resume_text.lower().split() job_words = job_text.lower().split() # Simple skill matching common_tech_skills = ["python", "javascript", "sql", "react", "node", "aws", "docker", "git"] resume_skills = [skill for skill in common_tech_skills if skill in resume_words] job_skills = [skill for skill in common_tech_skills if skill in job_words] matching_skills = list(set(resume_skills) & set(job_skills)) # Calculate basic score score = len(matching_skills) * 15 + min(len(resume_words) // 50, 25) score = min(max(score, 40), 95) # Generate results results_html = f"""

šŸŽÆ IQKiller Analysis Results

{score}%
Job Match Score

šŸ’Ŗ Your Strengths

  • Technical skills: {', '.join(resume_skills[:3]) if resume_skills else 'Multiple technologies'}
  • Professional experience
  • Strong background

šŸŽÆ Key Areas

  • Matching skills: {', '.join(matching_skills) if matching_skills else 'General fit'}
  • Interview preparation
  • Company research

šŸ“‹ Interview Questions to Practice

Technical: Tell me about your experience with {matching_skills[0] if matching_skills else 'your main technology stack'}

Behavioral: Describe a challenging project and how you overcame obstacles

Company: What interests you about this role and our company?

✨ IQKiller Analysis Complete • PDF Upload: Use extract_pdf_resume.sh script
""" return results_html def create_interface(): """Create minimal Gradio interface""" with gr.Blocks( title="IQKiller - AI Interview Prep", theme=gr.themes.Soft() ) as demo: gr.HTML("""

šŸŽÆ IQKiller

AI-Powered Interview Preparation Platform

šŸ“„ PDF Upload: Use extract_pdf_resume.sh script first

""") with gr.Row(): with gr.Column(): gr.HTML("

šŸ“„ Your Resume

") resume_input = gr.Textbox( placeholder="Paste your resume text here...\n\nInclude:\n• Work experience\n• Skills and technologies\n• Education\n• Projects\n\nšŸ’” For PDF resumes: Run ./extract_pdf_resume.sh first", lines=8, label="" ) with gr.Column(): gr.HTML("

šŸ’¼ Job Opportunity

") job_input = gr.Textbox( placeholder="Paste job description or URL here...\n\nInclude:\n• Company name and role\n• Required skills\n• Responsibilities\n• Requirements\n\nšŸ”— URLs will be automatically processed", lines=8, label="" ) analyze_btn = gr.Button( "šŸŽÆ Generate My Interview Guide", variant="primary", size="lg" ) results_output = gr.HTML() # Simple event handler analyze_btn.click( fn=simple_analysis, inputs=[resume_input, job_input], outputs=results_output ) gr.HTML("""

šŸŽÆ IQKiller v2.0 • Zero data retention • Enterprise security

""") return demo def main(): """Launch the application""" print("šŸŽÆ IQKiller - Minimal Working Version") print("=" * 40) print("āœ… Starting IQKiller...") print("🌐 Opening at: http://localhost:7860") print("šŸ’” For PDF resumes: Use ./extract_pdf_resume.sh") print("=" * 40) demo = create_interface() demo.launch( server_name="0.0.0.0", server_port=7860, share=False, show_error=True ) if __name__ == "__main__": main()