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

  1. Clone the repository

    git clone https://github.com/yourusername/job-fraud-detection.git
    cd job-fraud-detection
    
  2. Create and activate a virtual environment

    # Windows
    python -m venv venv
    .\venv\Scripts\activate
    
    # macOS/Linux
    python3 -m venv venv
    source venv/bin/activate
    
  3. Install dependencies

    pip install -r requirements.txt
    

βš™οΈ Configuration

  1. Create a .env file in the root directory:

    FLASK_APP=app.py
    FLASK_ENV=development
    SECRET_KEY=your-secret-key-here
    MODEL_PATH=models/
    HF_TOKEN=your-huggingface-token
    
  2. Place 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

  1. Install EB CLI: pip install awsebcli
  2. Initialize EB: eb init -p python-3.9 job-fraud-detection
  3. Create environment: eb create job-fraud-detection-env
  4. Deploy: eb deploy

πŸ§ͺ Testing

Run the test suite:

pytest

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. 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
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support