YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Job Fraud Detection API
A machine learning-powered API for detecting potentially fraudulent job postings using natural language processing and company verification.
π Features
- Fraud Detection: Analyzes job postings for potential fraud indicators
- Company Verification: Validates company information against known databases
- Email Analysis: Checks for phishing/suspicious email content
- RESTful API: Easy integration with web and mobile applications
- Scalable: Built with production deployment in mind
π Prerequisites
- Python 3.8+
- pip (Python package manager)
- Git
- Docker (optional, for containerized deployment)
π Installation
Clone the repository
git clone https://github.com/yourusername/job-fraud-detection.git cd job-fraud-detectionCreate and activate a virtual environment
# Windows python -m venv venv .\venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activateInstall dependencies
pip install -r requirements.txt
βοΈ Configuration
Create a
.envfile in the root directory:FLASK_APP=app.py FLASK_ENV=development SECRET_KEY=your-secret-key-here MODEL_PATH=models/ HF_TOKEN=your-huggingface-tokenPlace your trained model files in the
models/directory
π Running the Application
Development Mode
flask run
Production Mode (Using Gunicorn)
gunicorn --bind 0.0.0.0:5000 app:app
Using Docker
# Build the Docker image
docker build -t job-fraud-detection .
# Run the container
docker run -p 5000:5000 job-fraud-detection
π API Documentation
Endpoints
GET /
Health check endpoint.
Response:
{
"status": "success",
"message": "Job Fraud Detection API is running",
"endpoints": {
"GET /": "Health check (this endpoint)",
"POST /predict": "Predict job fraud probability"
}
}
POST /predict
Predict the probability of a job posting being fraudulent.
Request Body:
{
"job_title": "Senior Software Engineer",
"job_description": "Job description here...",
"company_name": "Tech Corp",
"company_domain": "techcorp.com",
"salary_raw": "$120,000 - $150,000",
"location": "Remote",
"email_subject": "Regarding your application",
"email_body": "Email content here..."
}
Response:
{
"status": "success",
"prediction": {
"company_auth_score": 85.5,
"job_fraud_probability": 0.12,
"email_risk_score": 0.15,
"final_verdict": "Legitimate",
"confidence": 0.88
}
}
π Deployment
Heroku
# Login to Heroku
heroku login
# Create a new Heroku app
heroku create your-app-name
# Deploy to Heroku
git push heroku main
AWS Elastic Beanstalk
- Install EB CLI:
pip install awsebcli - Initialize EB:
eb init -p python-3.9 job-fraud-detection - Create environment:
eb create job-fraud-detection-env - Deploy:
eb deploy
π§ͺ Testing
Run the test suite:
pytest
π€ Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π§ Contact
Your Name - your.email@example.com
Project Link: https://github.com/yourusername/job-fraud-detection
Acknowledgments
Made with β€οΈ by Your Name
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support