Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

SofiaMNC/credit_score_web_app

Repository files navigation

Credit Scoring Web App

Sofia Chevrolat (November 2020)

NB: This project is the 7th of a series of 8 projects comprising the syllabus offered by OpenClassrooms in partnership with Centrale Supélec and sanctioned by the Data Scientist diploma - Master level.


forthebadge

Overview

This credit scoring web app is based on the bank scoring data provided in the Home Credit Default Risk Kaggle competition hosted by the Home Credit Group. It provides an easy way to browse relevant data for each anonymized client, as well as their credit default risk score, a value predicted using a machine learning model created using the dataset.

The app is composed of two parts:

  • A backend : a Flask server giving access to the data via an API. The data is loaded from an Amazon S3 bucket. The server stubs were generated by the swagger-codegen project, using the OpenAPI-Spec.

  • A frontend : a Streamlit dashboard making calls to the backend to present relevant data.

The data modeling behind the creation of the machine learning model is detailed in the data_modeling submodule.

Requirements

API server:

connexion[swagger-ui] 2.7.0

python_dateutil 2.6.0+

setuptools 21.0.0

Werkzeug 1.0.0

joblib 0.14.1

lightgbm 3.0.0

pandas 1.0.1

requests 2.22.0

Dashboard:

pandas 1.0.1

plotly 4.12.0

requests 2.22.0

streamlit 0.71.0

Usage

Without Docker

API server

To run the server, please execute the following from the Server directory:

pip3 install -r requirements.txt
python3 -m swagger_server

When the server is run locally:

  • it is accessible here:

    http://localhost:8080/v2/
    
  • the documentation for the API is accessible here:

    http://localhost:8080/v2/ui/
    

Dashboard

To run the dashboard, please execute the following from the Dashboard directory:

pip3 install -r requirements.txt
streamlit run dashboard.py

When run locally, the dashboard is accessible here:

http://localhost:8501

With Docker

The API server and the Dashboard each have their own container that can be run separately, but the whole app is easily launched using Docker Compose.

To run the web app using Docker containers, please execute the following from the root directory:

docker-compose up

Releases

No releases published

Packages

No packages published