Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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="""
|
51 |
|
52 |
-
If the user
|
53 |
|
54 |
-
If
|
55 |
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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,
|