File size: 484 Bytes
9de729b 8a965da 9de729b 973bb39 9de729b db75012 9de729b 68ed0e8 9de729b |
1 2 3 4 5 6 7 8 9 10 11 12 |
# TEST MODEL
from transformers import pipeline
repository_id="mskov/roberta-base-toxicity"
classifier = pipeline('text-classification',repository_id)
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}") |