Skip to content

filipepcampos/case-based-explanations-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Case-based Explanations Demo

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
  1. About The Project
  2. Getting Started
  3. License

About The Project

Product Name Screen Shot

(back to top)

Built With

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.

Infrastructure Diagram: Infrastructure

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.

(back to top)

Getting Started

Interested in running or modifying this project? Here's an overview of how to get the project up and running.

Azure Cloud

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.

Local

Docker

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

Local Development

Run both the Nextjs Frontend and FastAPI Backend according to the readme of their respective directories.

(back to top)

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

(back to top)

About

A website which demonstrates how case-based explanations function

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published