Asad110786110 commited on
Commit
94c1663
Β·
verified Β·
1 Parent(s): f0fac61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -9
app.py CHANGED
@@ -39,15 +39,22 @@ def check_image_safety(image_paths):
39
  "type": "text",
40
  "text": """Analyze this image carefully for any unsafe or inappropriate content.
41
 
42
- Rules (follow strictly):
43
- 1. If the image contains nudity, partial nudity, sexually suggestive poses, shirtless images, vulgar or obscene gestures (e.g. middle finger),
44
- or promotes sexual activity β€” respond 'unsafe'.
45
- 2. If the image indirectly promotes or implies sexual, vulgar, or adult content
46
- (e.g. suggestive memes, sexual humor, revealing imagery, or implicit sexual symbolism) β€” respond 'unsafe'.
47
- 3. If the image shows violence, hate symbols, drug use, or disturbing content β€” respond 'unsafe'.
48
- 4. Only if the image is normal, decent, and appropriate (e.g. product, nature, person(e.g., selfies), normal pose) β€” respond 'safe'.
49
-
50
- Return only one word: 'safe' or 'unsafe'. Nothing else."""
 
 
 
 
 
 
 
51
  },
52
  {
53
  "type": "image_url",
 
39
  "type": "text",
40
  "text": """Analyze this image carefully for any unsafe or inappropriate content.
41
 
42
+ You must respond with EXACTLY ONE WORD: 'safe' or 'unsafe'. Do NOT explain.
43
+
44
+ Rules (follow strictly and literally):
45
+
46
+ 1. If the image contains any nudity, partial nudity, sexual body parts, sexually suggestive poses, shirtless bodies, or vulgar gestures β€” respond 'unsafe'.
47
+ 2. If the image contains ANY indirect sexual symbolism, adult humor, or innuendo β€” even if cartoonish, humorous, or metaphorical (e.g. bananas, donuts, or vegetables arranged suggestively) β€” respond 'unsafe'.
48
+ 3. If the image contains violence, hate symbols, drug use, blood, or disturbing scenes β€” respond 'unsafe'.
49
+ 4. If the image is fully normal, decent, and appropriate (e.g. nature, products, people in regular poses) β€” respond 'safe'.
50
+
51
+ Remember:
52
+ - Suggestive combinations or metaphors (like banana + donut imagery) = 'unsafe'.
53
+ - If unsure, choose 'unsafe'.
54
+
55
+ Return only: safe OR unsafe.
56
+ """
57
+
58
  },
59
  {
60
  "type": "image_url",