Skip to content

Latest commit

 

History

History

hugging_face_model_card

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Creating Model Card for Toxic Comments Classification in Tensorflow

In this notebook, we will download a model, dataset, and metric from Hugigng Face Hub and generate a interactive HTML Model Card using Intel AI Safety Model Card Generator Tool.

hugging-face-model-card performs the following steps:

  1. Download and Import Dependencies
  2. Download Dataset from Hugging Face Datasets
  3. Transform Dataset
    • Get ground truth label
  4. Download Modle and Process Outputs
  5. Get Bias Metric form Hugging Face
  6. Run Bias Metric
  7. Transform Output for Model Card
  8. Build Model Card

Running the notebook

To run the toxicity-tfma-model-card.ipynb, install the following dependencies:

  1. Intel® Explainable AI
  2. !pip install evaluate datasets transformers[torch] scikit-learn

References

Dataset citations

@article{aluru2020deep,
    title={Deep Learning Models for Multilingual Hate Speech Detection},
    author={Aluru, Sai Saket and Mathew, Binny and Saha, Punyajoy and Mukherjee, Animesh},
    journal={arXiv preprint arXiv:2004.06465},
    year={2020}
}