Skip to content

Webapp/Application implemention of my thesis about XAI and Interpretability of Transformer Models.

License

Notifications You must be signed in to change notification settings

LennardZuendorf/thesis-webapp

Repository files navigation

title emoji colorFrom colorTo sdk sdk_version app_file pinned license app_port models tags disable_embedding
Thesis
🎓
red
yellow
gradio
4.7.1
main.py
true
mit
8080
microsoft/GODEL-v1_1-large-seq2seq
CHAT
XAI
SHAP
GODEL
Gradio
true

Bachelor Thesis Webapp

📜 Info:

This is the UI showcase for my thesis about the interpretability of LLM based chatbot application and applications of XAI.

Current Release: v1.3.1

🔗 Links:

GitHub Repository

Huggingface Spaces Showcase

Non-Public Showcase

🏗️ Tech Stack:

Language and Framework: Python

Noteable Packages: 🤗 Transformers, FastAPI, Gradio, SHAP, BERTViz

👨‍💻 Author:

Author: @LennardZuendorf

Thesis Supervisor: Prof. Dr. Simbeck
Second Corrector: Prof. Dr. Hochstein

This Project was part of my studies of Business Computing at the University of Applied Science for Technology and Business Berlin (HTW Berlin).

Running the Project:

🐍 Python with FastAPI :

(This assumes you have set up a python environment, I recommend using a virtual environment.)

  1. Clone the repository using git or GitHub cli.
  2. Start the (virtual) environment.
  3. Set the environment variable "HOSTING", i.e. like this export HOSTING=local, see fastAPI Docu
  4. Install the requirements using pip install -r requirements.txt
  5. Run the app using uvicorn main:app. You can add --reload to enable hot reloading. The app will be available at localhost:8000.

🐳 Dockerfile :

(This assumes you have set up docker desktop or are using a hosting service able to handle Dockerfiles.)

  1. Clone the repository using git or GitHub cli.
  2. Build the docker image using docker build -t thesis-webapp -f Dockerfile . ., the command commented in the docker file or the command referenced by your hosting service.
  3. Run the docker image using docker run --name thesis-webapp -e HOSTING=local -p 8080:8080 thesis-webapp, the command commented in the docker file or the command referenced by your hosting service.
  4. The app will be available at localhost:8080. If you are using a hosting service, the port may be different.

🐳 Docker Image :

(This assumes you have set up docker desktop or are using a hosting service able to handle Docker images.)

  1. Pull the docker image from ghcr using docker pull ghcr.io/LennardZuendorf/thesis-webapp:1.3.1.
  2. Run the docker image in terminal using docker run --name thesis-webapp -e PW=test -p 8080:8080 lennardzuendorf/thesis-webapp::1.3.1, the command commented in the docker file or the command referenced by your hosting service.
  3. The app will be available at localhost:8080. If you are using a hosting service, the port may be different.

📝 License and Credits:

This project is licensed under the MIT License, see LICENSE for more information. Please cite this project, it's author and my university if you use it in your work.

  • Title: Building an Interpretable Natural Language AI Tool based on Transformer Models and approaches of Explainable AI.
  • Date: 2024-02-14
  • Author: Lennard Zündorf
  • University: HTW Berlin

See code for in detailed credits, work is strongly based on:

captum

shap

GODEL

Mistral 7B (Instruct)

Custom Component (/components/iframe/)

Is based on Gradio component, see individual README for full changelog.