thong0710 commited on
Commit
2c44d1e
·
verified ·
1 Parent(s): 80d84ce
Files changed (1) hide show
  1. 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 > 50:
130
  is_violent = True
131
- elif violence_label.lower() == "violent" and violence_score > 80:
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: