dp92 commited on
Commit
3fca404
·
1 Parent(s): 919822f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -53,7 +53,4 @@ def classify(text):
53
  preds = torch.sigmoid(logits).squeeze().tolist()
54
  return {labels[i]: preds[i] for i in range(len(labels))}
55
 
56
- # Example usage
57
- text = "You are a stupid idiot"
58
- preds = classify(text)
59
- print(preds) # Output: {'toxic': 0.98, 'severe_toxic': 0.03, 'obscene': 0.94, 'threat': 0.01, 'insult': 0.88, 'identity_hate': 0.02}
 
53
  preds = torch.sigmoid(logits).squeeze().tolist()
54
  return {labels[i]: preds[i] for i in range(len(labels))}
55
 
56
+ # Example usage