Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -138,9 +138,9 @@ unsafe_keywords = [
|
|
| 138 |
"grenade", "horror", "beheaded", "torture", "hostage", "rape",
|
| 139 |
"war", "massacre", "chainsaw", "poison", "strangle", "hang", "drown"
|
| 140 |
]
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
|
| 145 |
|
| 146 |
|
|
|
|
| 138 |
"grenade", "horror", "beheaded", "torture", "hostage", "rape",
|
| 139 |
"war", "massacre", "chainsaw", "poison", "strangle", "hang", "drown"
|
| 140 |
]
|
| 141 |
+
if any(word in caption.lower() for word in unsafe_keywords):
|
| 142 |
+
return False
|
| 143 |
+
return True
|
| 144 |
|
| 145 |
|
| 146 |
|