Spaces:
Runtime error
Runtime error
John Doe
commited on
Commit
·
409458e
1
Parent(s):
aed73c5
- image_moderator.py +2 -1
image_moderator.py
CHANGED
|
@@ -68,7 +68,8 @@ from transformers import pipeline
|
|
| 68 |
from better_profanity import profanity
|
| 69 |
|
| 70 |
# Load profanity model
|
| 71 |
-
pipeline("text-classification", model="unitary/toxic-bert").save_pretrained("./models/unitary-toxic-bert")
|
|
|
|
| 72 |
profanity.load_censor_words()
|
| 73 |
custom_words = [
|
| 74 |
"idiot", "moron", "dumb", "stupid", "loser", "bastard", "retard", "scumbag",
|
|
|
|
| 68 |
from better_profanity import profanity
|
| 69 |
|
| 70 |
# Load profanity model
|
| 71 |
+
# pipeline("text-classification", model="unitary/toxic-bert").save_pretrained("./models/unitary-toxic-bert")
|
| 72 |
+
toxic_classifier = pipeline("text-classification", model="./models/unitary-toxic-bert")
|
| 73 |
profanity.load_censor_words()
|
| 74 |
custom_words = [
|
| 75 |
"idiot", "moron", "dumb", "stupid", "loser", "bastard", "retard", "scumbag",
|