This project provides a machine learning pipeline for lead scoring, with a FastAPI web interface and a background worker.
- 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.
The application (API and Worker) is configured to run locally, while the infrastructure (RabbitMQ, MinIO) remains in Docker.
- Python 3.9+
- Docker & Docker Compose
Start RabbitMQ and MinIO using Docker Compose:
docker compose up -dCheck the status:
- RabbitMQ Management UI: http://localhost:15672 (guest/guest)
- MinIO Console: http://localhost:9001 (minioadmin/minioadmin)
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.txtThe application uses environment variables from the .env file. Ensure it is correctly set up for local development (defaults to localhost for services).
You need to run both the API and the Worker in separate terminal windows.
uvicorn main:app --reloadThe API will be available at http://localhost:8000.
python worker.pyOnce the API is running, you can access the interactive documentation at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc