Quick Start Guide
Before starting, download the latest Detox data file.
Install the Detox wheel using PIP. NumPy should automatically be installed as a dependency if not already available.
pip install detox_detoxai-VERSION-py3-none-any.whl
Import the detox module, load data files, and initialize the Moderator object:
import detox # Load the Detox data file from JSON, for example by running: import json detox_data = json.load(open('./Detox_Data.json')) # Initialize Moderator and we're good to go! moderator = detox.Moderator(detox_data) message = "Welcome to Detox!" message_toxic = moderator.is_toxic(message)
For more details, see our Overview documentation guide.