Insult detection Rest API service based on Detoxify package.
822
HTTP API to classify the toxicity of text messages. This was inspired by detoxify-flask-container with a few changes
Source of this docker image can be found https://github.com/LiveHelperChat/detoxify-flask-container
multilingual original-small originalThe following command starts the service on port 8080.
Pulls image always
docker run --pull always --rm --name lhc-detoxify \
-p 8080:80 -e DETOXIFY_MODEL="original-small" \
remdex/lhc-detoxify:latest
Runs local image if it exists. Useful if you are building custom image
docker run --rm --name lhc-detoxify \
-p 8080:80 -e DETOXIFY_MODEL="original-small" \
remdex/lhc-detoxify:latest
Restart on failure
docker run -d --pull always --name lhc-detoxify -p 8080:80 -e DETOXIFY_MODEL="original-small" --restart always remdex/lhc-detoxify:latest
docker build --progress=plain -f Containerfile -t remdex/lhc-detoxify .
The following command sends a HTTP request that classifies the toxicity of a text message.
curl '127.0.0.1:8080?text=foobar'
There is still a memomry leak whcih I could not trace back and I think it's related to Detoxify package itself. It's recomended to restart docker image daily etc.
12 12 * * * /usr/bin/docker restart lhc-detoxify /dev/null 2>&1
Content type
Image
Digest
sha256:cc312c1cf…
Size
2 GB
Last updated
over 1 year ago
docker pull remdex/lhc-detoxify