Skip to content

Machine Learning Application to predict card approval based on profile information

Notifications You must be signed in to change notification settings

LovePelmeni/Credit-Card-Approval-Project

Repository files navigation

Credit Card Approval Project

This is home to Credit Card Approval Project, an offline machine learning model for predicting credit card approval, based on your personal information, including client's credit intentions and fcredit window. Deployed it using modern FastAPI python web framework.

Technologies

  1. Python (main backend language, both for ML and Web deployment)
  2. Docker and Docker-Compose (for containerization)
  3. Bash Scripting (for creating deployment pipeline)
  4. PostgreSQL (database for storing user's information about the project)

Versioning

  1. 3.9 <= Python <= 3.10
  2. Docker >= 20.10.12
  3. Docker-Compose >= 1.29.2
  4. GNU bash >= 3.2.57

Directory overview

src - contains all source code for the project, including ML models and Datasets

env - Environment Variables for the project

deployment - deployment files and bash scripts

docs - contains documentation for the project

tests - contains tests

proj_requirements - contains project dependencies instructions

Usage

Clone project using following command

$ git clone https://github.com/LovePelmeni/Credit-Card-Approval-Project.git

Local Development

Setting up Python Virtual Environment

# Creating new virtual environment

$ python3 -m venv fn_env
$ source ./fn_env/bin/activate 

Installing project dependencies

$ pip install -r proj_requirements/module_requirements.txt -c proj_requirements/module_constraints.txt

Run Uvicorn ASGI Server via console

$ cd credit_card_approval

$ uvicorn settings:application --host 0.0.0.0 --port 8080 --log-level=debug --workers 8

NOTE: you can adjust number of asgi workers based on your configuration recommended number is 2 * (number of cores) + 1

Deployment

Running project using Docker-Compose

$ docker-compose up -d

In case you don't want to keep cache of this image add --no--cache flag

About

Machine Learning Application to predict card approval based on profile information

Resources

Stars

Watchers

Forks

Packages

No packages published