Skip to content

ajthr/ls

Repository files navigation

Lead Scoring ML Engine

This project provides a machine learning pipeline for lead scoring, with a FastAPI web interface and a background worker.

Architecture

  • FastAPI (api): Web interface to submit training requests.
  • Worker (worker): Processes training tasks asynchronously.
  • RabbitMQ: Message broker for task queuing.
  • MinIO: S3-compatible storage for datasets and models.

Local Setup (Without Docker for Application)

The application (API and Worker) is configured to run locally, while the infrastructure (RabbitMQ, MinIO) remains in Docker.

1. Prerequisites

  • Python 3.9+
  • Docker & Docker Compose

2. Start Infrastructure

Start RabbitMQ and MinIO using Docker Compose:

docker compose up -d

Check the status:

3. Install Dependencies

Create a virtual environment and install the required packages:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

4. Configuration

The application uses environment variables from the .env file. Ensure it is correctly set up for local development (defaults to localhost for services).

5. Run the Application

You need to run both the API and the Worker in separate terminal windows.

Start the API:

uvicorn main:app --reload

The API will be available at http://localhost:8000.

Start the Worker:

python worker.py

API Documentation

Once the API is running, you can access the interactive documentation at:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors