Spaces:
Running
Running
LAST
Browse files- app/safety_check.py +2 -2
app/safety_check.py
CHANGED
|
@@ -126,9 +126,9 @@ def check_violence_image(image: Image.Image) -> str:
|
|
| 126 |
|
| 127 |
# Đánh giá kết quả
|
| 128 |
is_violent = False
|
| 129 |
-
if violence_label.lower() == "non-violent" and violence_score >
|
| 130 |
is_violent = True
|
| 131 |
-
elif violence_label.lower() == "violent" and violence_score >
|
| 132 |
is_violent = True
|
| 133 |
|
| 134 |
if is_violent:
|
|
|
|
| 126 |
|
| 127 |
# Đánh giá kết quả
|
| 128 |
is_violent = False
|
| 129 |
+
if violence_label.lower() == "non-violent" and violence_score > 80:
|
| 130 |
is_violent = True
|
| 131 |
+
elif violence_label.lower() == "violent" and violence_score > 50:
|
| 132 |
is_violent = True
|
| 133 |
|
| 134 |
if is_violent:
|