Skip to content

uhh-lt/codebook_automation

Repository files navigation

Build Status

Codebook Automation

Modern NuxtJS WebApp build on top of FastAPI REST API to facilitate using state-of-the-art NLP models to predict Codebooks for CodeAnno.

How to add models

Coming soon...

How to run locally

Assuming that your in the root folder of this repository

pip install -r requirements.txt
CBA_API_DATA_ROOT=/tmp CBA_API_REDIS_HOST=localhost CBA_API_REDIS_PORT=6379 uvicorn main:app --host 0.0.0.0 --port 8081

How to run with docker

Make sure to set the correct environment variables in the .env file!

docker-compose up -d

Docker images will be pulled from docker-hub if not available on the system. To manually and locally build the image run:

docker build -t uhhlt/codebook_automation_api:latest .
docker build -t uhhlt/codebook_automation_app:latest ./cba_webapp/

How to run tests

Assuming that

  • PWD is root folder of this repository
  • config.backend.data_root_env_var == "CBA_API_DATA_ROOT"
  • clean redis instance is running on localhost:6379
PYTHONPATH=${PWD} CBA_API_DATA_ROOT=/tmp CBA_API_REDIS_HOST=localhost CBA_API_REDIS_PORT=6379 pytest