YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Hate Speech Classification Model Guide
Introduction
This document provides instructions for importing and using the hate speech classification model from Hugging Face in a Google Colab environment.
Steps for Setup
1. Import Necessary Libraries
import tensorflow as tf
import tensorflow_hub as hub
2. Clone the Model Repository
!git clone https://huggingface.co/dileepa/hate_speech_classification
3. Load the Pre-trained Model
cnn_model = tf.keras.models.load_model(
'hate_speech_classification/model.h5',
custom_objects={'KerasLayer': hub.KerasLayer}
)
4. Example Usage
# Test prediction
sample_text = "Insert your text here"
result = cnn_model.predict([sample_text])
print(result)
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support