Instructions to use NightPrince/Toxic_Classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TF-Keras
How to use NightPrince/Toxic_Classification with TF-Keras:
# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy), and from_pretrained_keras was removed in huggingface_hub 1.0. # See https://github.com/keras-team/tf-keras for more details. # !pip install "huggingface_hub<1.0" tf_keras from huggingface_hub import from_pretrained_keras model = from_pretrained_keras("NightPrince/Toxic_Classification") - Keras
How to use NightPrince/Toxic_Classification with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://NightPrince/Toxic_Classification") - Notebooks
- Google Colab
- Kaggle
Download label_map.json from NightPrince/Toxic_Classification: direct link, hf CLI and curl.
- Browser
- Download file 183 Bytes
-
https://huggingface.co/NightPrince/Toxic_Classification/resolve/main/label_map.json
- Command line
-
hf download hf://NightPrince/Toxic_Classification/label_map.json
-
curl -L -o label_map.json https://huggingface.co/NightPrince/Toxic_Classification/resolve/main/label_map.json
183 Bytes
| { | |
| "0": "toxic", | |
| "1": "severe_toxic", | |
| "2": "obscene", | |
| "3": "threat", | |
| "4": "insult", | |
| "5": "identity_hate", | |
| "6": "non_toxic", | |
| "7": "other", | |
| "8": "unknown" | |
| } | |