rushkid5/quick-bright-demo
0
1from PIL import Image2import numpy as np3 4def is_safe_image(file_path):5 """Basic content safety check (placeholder)"""6 try:7 img = Image.open(file_path)8 # Convert to numpy array for analysis9 img_array = np.array(img)10 11 # In a real application, this would include:12 # 1. NSFW content detection13 # 2. Appropriate content validation14 # 3. Privacy compliance checks15 16 # For this demo, we'll just check image dimensions17 if min(img_array.shape[:2]) < 50:18 return False # Reject very small images19 20 return True21 except:22 return False