Horbee commited on
Commit
20da490
·
verified ·
1 Parent(s): 506065e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -0
README.md CHANGED
@@ -32,6 +32,22 @@ Detection of offensive, or inappropriate German-language comments
32
 
33
  Social media moderation tools
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ## Limitations:
36
 
37
  Trained only on GermEval 2018/2019 data — performance on out-of-domain or highly informal texts may vary.
 
32
 
33
  Social media moderation tools
34
 
35
+ ## Example Use:
36
+
37
+ ```python
38
+ from transformers import pipeline
39
+
40
+ classifier = pipeline("text-classification",
41
+ model="Horbee/bert-german-offensive-comment-classifier")
42
+
43
+ sequence_to_classify = "Ich kann es nicht ausstehen, mit so einem Idioten im selben Raum zu sein."
44
+
45
+ result = classifier(sequence_to_classify)
46
+
47
+ print(result) # [{'label': 'Offensive', 'score': 0.9911119341850281}]
48
+
49
+ ```
50
+
51
  ## Limitations:
52
 
53
  Trained only on GermEval 2018/2019 data — performance on out-of-domain or highly informal texts may vary.