- create .env file with following: (you will need a database URL as well...)
MODEL_PATH=../model/lightgbm_model.pkl
LABEL_ENCODERS_PATH=../model/label_encoders.pkl
- change directories into back-end
- download dataset from kaggle called home credit default risk. place csvs inside data/home-credit-default-risk.
- run
python3 data_preprocessing.py
- run
python3 train_model.py
- run
python3 predict_model.py
- install the library:
pip install fastapi uvicorn
- Modify the code as you see needed
- install dependencies as necessary
- run the server by typing:
uvicorn main:app --reload
P.S. By default, API should be visible at this local address: http://127.0.0.1:8000
- go to the
front-end
folder (cd front-end) - type
npm i
in the terminal (npm i) - install dependencies as necessary
- type
npm run dev
- Open local hosted link