Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jesufemi-o/lendr

A simple end to end consumer lending decision engine powered by Google Cloud Platform (firebase hosting and cloudrun)
https://github.com/jesufemi-o/lendr

docker fastapi firebase lending machine-learning python

Last synced: 23 days ago
JSON representation

A simple end to end consumer lending decision engine powered by Google Cloud Platform (firebase hosting and cloudrun)

Awesome Lists containing this project

README

        

# Firebase + Cloudrun + Machine learning

A simple loan eligibility decision system developed with fastapi and scikit learn for the server side and HTML, CSS and Javascript for the client side

The Backend is deployed on google cloud run while the static frontend is served with firebase hosting.

# How to serve the frontend locally
- install firebase tools
~~~
npm install -g firebase-tools
~~~

- serve on localhost
~~~
firebase serve
~~~

# How to serve the backend locally [Docker]

- navigate to the server folder and create a .env file and enter the following values

~~~
IS_DEBUG = False
API_KEY =
DEFAULT_MODEL_PATH=./assets/finalized_model.sav
~~~

you can simply generate an api key using the python repl as follows:

~~~python
import uuid
print(str(uuid.uuid4()))
~~~

- run the shell scripts as follows:
~~~
chmod +x run.sh
chmod +x build.sh
~~~

- build the image
~~~
./build.sh
~~~

- serve the api
~~~
./run.sh
~~~

- navigate to the api documentation on localhost:8080/docs