API and Demo for online user comment analysis
See requirements.txt
Run app within Kubernetes.
- Store model files named
bert_large_toxic.bin
,bert_config.json
,toxic_fasttext.bin
andtoxic_fasttext_de.bin
in directory${MODEL_DIR}
(must be accessible from container)
- Build docker image with
docker build --build-arg MODEL_DIR=${MODEL_DIR} -t ${...} .
- Create a secret
nohate-mysql-secret
that holds the keyroot_password
for the MySQL database - Set up MYSQL with YAML files in k8/mysql
- Create a database named
nohate
with acomments
table as follows:
CREATE DATABASE nohate;
CREATE TABLE comments(id INTEGER AUTO_INCREMENT PRIMARY KEY, text TEXT, date DATETIME, label INTEGER, lang TEXT, source TEXT);
- Deploy app (and required services) with YAML files in k8