Spaces:
Runtime error
Download readme.md from deepakkumar00/MatchHire: direct link, hf CLI and curl.
- Browser
- Download file 7.1 kB
-
https://huggingface.co/spaces/deepakkumar00/MatchHire/resolve/main/readme.md
- Command line
-
hf download hf://spaces/deepakkumar00/MatchHire/readme.md
-
curl -L -o readme.md https://huggingface.co/spaces/deepakkumar00/MatchHire/resolve/main/readme.md
A newer version of the Gradio SDK is available: 6.32.0
Resume Relevance Check System - Complete Setup Guide
π Overview
This is a complete full-stack Resume Relevance Check System that uses FastAPI backend with SQLite database and AI-powered analysis capabilities.
π Project Structure
resume_relevance_system/
βββ server.py # FastAPI backend server
βββ database.py # SQLite database models and configuration
βββ models.py # Pydantic models for API
βββ text_processor.py # AI/NLP processing engine
βββ run.py # Server startup script
βββ setup.py # Installation script
βββ requirements.txt # Python dependencies
βββ index.html # Frontend web application
βββ resume_analysis.db # SQLite database (created automatically)
β‘ Quick Start
1. Clone/Download Project Files
Create a new directory and save all the backend files from the FastAPI artifact into separate Python files.
2. Install Dependencies
# Option 1: Run the setup script
python setup.py
# Option 2: Install manually
pip install fastapi==0.104.1 uvicorn==0.24.0 sqlalchemy==2.0.23 python-multipart==0.0.6 PyMuPDF==1.23.8 python-docx==1.1.0 sentence-transformers==2.2.2 scikit-learn==1.3.2 python-dotenv==1.0.0 pydantic==2.5.0 aiofiles==23.2.1
# Install spaCy English model (optional but recommended)
python -m spacy download en_core_web_sm
3. Start the Backend Server
# Option 1: Using the run script
python run.py
# Option 2: Direct uvicorn command
uvicorn server:app --reload --host 127.0.0.1 --port 8000
4. Open the Frontend
- Save the updated HTML file as
index.html - Open
index.htmlin your web browser - The frontend will automatically connect to the backend at
http://127.0.0.1:8000
π§ Configuration
Backend Configuration
The system uses SQLite by default. To change to PostgreSQL for production:
# In database.py, replace:
SQLALCHEMY_DATABASE_URL = "sqlite:///./resume_analysis.db"
# With:
SQLALCHEMY_DATABASE_URL = "postgresql://username:password@localhost/resume_analysis"
CORS Configuration
For production, update the CORS settings in server.py:
app.add_middleware(
CORSMiddleware,
allow_origins=["https://yourdomain.com"], # Your frontend URL
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
π Database Schema
Tables Created Automatically:
- resumes: Stores uploaded resume files and extracted text
- job_descriptions: Stores job description files and text
- analyses: Stores analysis results and scores
- activity_logs: Tracks user activities and system events
π€ AI/NLP Features
Text Processing Capabilities:
- PDF/DOCX Extraction: Using PyMuPDF and python-docx
- Hard Match Scoring: TF-IDF vectorization and keyword matching
- Soft Match Scoring: Sentence transformers with cosine similarity
- Skill Extraction: NLP-based skill identification
- Feedback Generation: Automated personalized recommendations
Supported File Types:
- Resumes: PDF, DOCX
- Job Descriptions: PDF, DOCX, TXT
π API Endpoints
File Upload
POST /upload/resume/- Upload resume filePOST /upload/job-description/- Upload job description
Analysis
POST /analyze/- Analyze resume against job descriptionGET /analyses/- Get analysis historyGET /analyses/{id}- Get specific analysis details
Data Management
GET /resumes/- List uploaded resumesGET /job-descriptions/- List uploaded job descriptionsDELETE /resumes/{id}- Delete resumeDELETE /analyses/{id}- Delete analysis
π― Usage Workflow
- Upload Files: Upload resume (PDF/DOCX) and job description
- Automatic Processing: Files are processed and text extracted
- AI Analysis: System calculates hard/soft match scores
- Results Display: View detailed analysis with recommendations
- History Tracking: All analyses are saved for future reference
π Analysis Metrics
Scoring System:
- Hard Match (70% weight): Keyword-based matching using TF-IDF
- Soft Match (30% weight): Semantic similarity using embeddings
- Overall Score: Weighted combination of hard and soft scores
- Verdict: High (β₯75%), Medium (50-74%), Low (<50%)
Features:
- Missing skills identification
- Personalized feedback generation
- Skill gap analysis
- Industry-specific recommendations
π Development Mode
Hot Reload
The server runs in development mode with auto-reload enabled. Changes to Python files will automatically restart the server.
Debug Mode
Add debug logging by setting:
import logging
logging.basicConfig(level=logging.DEBUG)
π± Frontend Features
Interactive UI:
- Real-time file upload with progress indication
- Animated score visualization
- Responsive design for mobile/desktop
- Search and filter capabilities
- Analysis history dashboard
Modern Design:
- Gradient backgrounds and glassmorphism effects
- Smooth animations and transitions
- Intuitive user experience
- Professional styling
π¨ Troubleshooting
Common Issues:
- CORS Errors: Make sure backend is running on port 8000
- File Upload Fails: Check file format (PDF/DOCX only)
- Analysis Errors: Verify both files are uploaded successfully
- Database Issues: Delete
resume_analysis.dbto reset database
Performance Optimization:
- Use PostgreSQL for production workloads
- Implement caching for frequently accessed analyses
- Add database indexing for large datasets
- Consider async processing for large files
π Production Deployment
Backend Deployment:
# Install production ASGI server
pip install gunicorn
# Run with Gunicorn
gunicorn server:app -w 4 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000
Frontend Deployment:
- Host the HTML file on any web server
- Update API_BASE_URL to production backend URL
- Consider using CDN for static assets
Database Setup:
- Migrate to PostgreSQL for production
- Set up regular backups
- Implement connection pooling
- Add database monitoring
π Success!
Your Resume Relevance Check System is now ready! The system provides:
β
AI-Powered Analysis: Advanced NLP for resume scoring
β
Database Integration: Persistent storage with SQLite/PostgreSQL
β
RESTful API: Clean, documented API endpoints
β
Modern Frontend: Responsive, interactive web interface
β
Production Ready: Scalable architecture for deployment
π Support
For issues or questions:
- Check the troubleshooting section
- Verify all dependencies are installed correctly
- Ensure the backend server is running on port 8000
- Check browser console for any JavaScript errors
Happy analyzing! π