File size: 526 Bytes
9de729b
8a965da
9de729b
973bb39
33d11d7
 
 
 
db75012
9de729b
 
68ed0e8
9de729b
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# TEST MODEL

from transformers import pipeline


# classifier = pipeline('text-classification', model="mskov/roberta-base-toxicity")

classifier = pipeline(model="mskov/roberta-base-toxicity")

text = "Kederis proclaims innocence Olympic champion Kostas Kederis today left hospital ahead of his date with IOC inquisitors claiming his innocence and vowing: quot;After the crucifixion comes the resurrection. quot; .."
result = classifier(text)

predicted_label = result[0]["label"]
print(f"Predicted label: {predicted_label}")