An interactive application for exploring linear classifiers and key classification metrics, including true positives, false positives, true negatives, and false negatives. This tool demonstrates how AI models inevitably produce incorrect classifications, providing a hands-on way to understand the ethical implications of these errors.
A config file (public/config.json) is loaded before the application is started. It supports the following keys:
- defaultLanguage (string, default: "en"): Default language to use.
- startLevel (number, default: -1): Starting level.
- showHomePage (boolean, default: true): Show the home page on load otherwise directly show the introduction level
The application is built using React + Vite, powered by tailwind-css for styling and typescript.
Make sure that node and npm (or pnpm) is installed.
Instead of using pnpm, you can also use npm. However pnpm is preferred since it is much faster and efficient.
pnpm i
pnpm run dev
You can compile the application, which can be then be accessed in from the dist/ folder.
pnpm run build
To preview the built version, you can run
pnpm run preview
You can also run the app using docker
docker build . -t ai-ethics
docker -p 4173:4173 -t ai-ethics:latest
To add a new translation, the following steps are necessary:
- Figure out the language code for the language you want to add, e.g.
eofor Esperanto. - Copy a locale file from
tr/for a language you are familiar with and rename its basename to match the new language code, e.g. copytr/en.jsontotr/eo.json. - Translate all the texts in the new locale file. Preserve whitespace.
- Update the
intlayer.config.tsfile. For e.g. addLocales.ESPERANTOto locales array. - Add the import to the
tr/index.tsfile and update the object being exported. For e.g. addingimport eoTranslations from './eo.json'and adding a new value ofeo: eoTranslations. - To update the intlayer dictionaries you can the following command. Note, it builds the dictionary on running app via
devcommand as well.
pnpm dlx intlayer build