A website which demonstrates how case-based explanations help explain the rationale behind Machine Learning classifiers' decisions.
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This project was built using Next.js for the frontend which communicates with an API backend powered by FastAPI. The model was trained using PyTorch and the PyTorch Lightning framework. We deploy the website on Azure Cloud through the use of Terraform scripts.
Step | Action |
---|---|
1 | User submits drawing to the Nextjs server |
2 | Nextjs server passes the request to the prediction API |
3 | Prediction API returns a prediction, confidence and a set of URLs pointing to explanation images |
4 | Nextjs updates the frontend page |
5 | Frontend requests the explanation images from the CDN |
Note: While using a CDN, as shown in the infrastructure, would be ideal, this project omits this step for cost saving measures, since Azure Front Door is not available in the free Azure tier.
Interested in running or modifying this project? Here's an overview of how to get the project up and running.
This project was developed with Azure deployment in mind. The infrastructure consists of two main components, storage
and container-apps
, which are deployed separately using Terraform. For more detailed instructions refer to the README.md file within said directory.
The simplest option to run locally is to use the prebuilt docker images published on Docker Hub for both the frontend and api. Simply run:
docker -p 80:80 run filipepcampos/api
docker -p 3000:3000 run filipepcampos/frontend
Run both the Nextjs Frontend and FastAPI Backend according to the readme of their respective directories.
Distributed under the GPL-3.0 License. See LICENSE
for more information.