Spaces:
Build error
Build error
Update app.py
Browse files
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
|
|
|
|
|
|