Update README.md
Browse files
README.md
CHANGED
@@ -24,9 +24,23 @@ widget:
|
|
24 |
|
25 |
# Data Fields:
|
26 |
|
27 |
-
**label**:
|
28 |
|
29 |
# Application:
|
30 |
* This model is useful for the detection of hatespeech in the tweets.
|
31 |
* There are numerous situations where we have tweet data but no labels, so this approach can be used to create labels.
|
32 |
* You can fine-tune this model for your particular use cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
# Data Fields:
|
26 |
|
27 |
+
**label**: 0 - it is a hate speech, 1 - not a hate speech
|
28 |
|
29 |
# Application:
|
30 |
* This model is useful for the detection of hatespeech in the tweets.
|
31 |
* There are numerous situations where we have tweet data but no labels, so this approach can be used to create labels.
|
32 |
* You can fine-tune this model for your particular use cases.
|
33 |
+
|
34 |
+
# Model Implementation
|
35 |
+
|
36 |
+
# !pip install transformers[sentencepiece]
|
37 |
+
|
38 |
+
from transformers import pipeline
|
39 |
+
|
40 |
+
model_name="Sakil/distilbert_lazylearner_hatespeech_detection"
|
41 |
+
|
42 |
+
classifier = pipeline("text-classification",model=model_name)
|
43 |
+
|
44 |
+
classifier("!!! RT @mayasolovely: As a woman you shouldn't complain about cleaning up your house. & as a man you should always take the trash out...")
|
45 |
+
|
46 |
+
# Github: [Sakil Ansari](https://github.com/Sakil786/hate_speech_detection_pretrained_model)
|