Athspi commited on
Commit
0327eea
·
verified ·
1 Parent(s): 61acb23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -4
app.py CHANGED
@@ -47,13 +47,28 @@ def is_prohibited_request(uploaded_file, object_type):
47
 
48
  generate_content_config = types.GenerateContentConfig(
49
  system_instruction=[
50
- types.Part.from_text(text="""Your AI should determine whether the user is asking to remove a person or an animal.
51
 
52
- If the user requests removal of a person or an animal (e.g., "Remove person," "Remove animal"), respond with "Yes."
53
 
54
- If the request involves removing specific objects or features from a person (e.g., "Remove hair from person," "Remove mouth from person," "Remove sunglasses when worn," "Remove watermark on a person's body"), respond with "No."
55
 
56
- If the request is about removing objects that are not part of a person or animal (e.g., "Remove background," "Remove sunglasses on a table," "Delete phone when in hand"), respond with "No." """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  ],
58
  temperature=0.0,
59
  max_output_tokens=1,
 
47
 
48
  generate_content_config = types.GenerateContentConfig(
49
  system_instruction=[
50
+ types.Part.from_text(text="""Reject Requests That Require AI to Generate a Human, Animal, or Their Features (Respond with "No")
51
 
52
+ If the user asks to remove or modify human or animal features (e.g., "Remove eyes," "Remove mouth," "Remove face," "Remove hair from person," "Remove a tattoo on skin," "Remove a logo printed on a person's body") → AI should reject the request and respond with "No."
53
 
54
+ If removing something would require AI to generate missing human or animal body parts AI should reject the request and respond with "No."
55
 
56
+
57
+
58
+ 2. Reject Requests That Require AI to Recreate Text on a Person's Body (Respond with "No")
59
+
60
+ If the user asks to remove a watermark, logo, or text that is on a person’s body → AI should reject the request and respond with "No."
61
+
62
+ However, if the watermark or text is on an object or background (not a person/animal) → **AI can approve and respond with "Yes."
63
+
64
+
65
+
66
+ 3. Approve Object and Background Removal (Respond with "Yes")
67
+
68
+ If the user asks to remove non-living objects (e.g., "Remove sunglasses on table," "Remove phone in hand," "Remove background") → **AI should approve and respond with "Yes."
69
+
70
+ If the user asks to remove a person or animal without generating a replacement (e.g., "Remove person," "Remove animal") → **AI should approve and respond with "Yes."
71
+ """)
72
  ],
73
  temperature=0.0,
74
  max_output_tokens=1,