Skip to content

Rajarshi8/ATTRISHIELD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Customer Attrition Prediction API

A FastAPI-based application for predicting customer attrition using ensemble machine learning models.

Prerequisites

  • Python 3.8+
  • pip (Python package installer)
  • Virtual environment

Setup Instructions

  1. Clone the repository:
git clone <repository-url>
cd icdmaiproject
  1. Create and activate a virtual environment:

Windows:

python -m venv .venv
.venv\Scripts\activate

Linux/Mac:

python -m venv .venv
source .venv/bin/activate
  1. Install required packages:
pip install -r requirements.txt
  1. Set up environment variables: Create a .env file in the backend directory with:
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
MODEL_PATH=path/to/your/models

Running the Application

  1. Navigate to the backend directory:
cd backend
  1. Start the FastAPI server:
uvicorn app:app --reload --port 8000

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

API Endpoints

  • GET /predict/attrition/{customer_id}: Predict attrition for a specific customer
  • GET /predict/attrition/batch: Batch prediction for all active customers

API Documentation

Once the server is running, you can access:

  • Interactive API docs: http://localhost:8000/docs
  • Alternative API docs: http://localhost:8000/redoc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published