Enoder commited on
Commit
3bcf408
·
verified ·
1 Parent(s): 2a411d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -38,8 +38,8 @@ def generate_image_from_neighbors(base_pixels):
38
 
39
  # Vérification pour changer aléatoirement le pixel pour plus d'unicité
40
  if random.random() < 0.2: # 20% de chance de changer le pixel
41
- new_pixel_color += np.array([random.randint(-50, 50) for _ in range(3)])
42
- new_pixel_color = np.clip(new_pixel_color, 0, 255).astype(np.uint8)
43
 
44
  generated_image[i, j] = new_pixel_color
45
 
 
38
 
39
  # Vérification pour changer aléatoirement le pixel pour plus d'unicité
40
  if random.random() < 0.2: # 20% de chance de changer le pixel
41
+ additional_variation = np.array([random.randint(-50, 50) for _ in range(3)])
42
+ new_pixel_color = np.clip(new_pixel_color + additional_variation, 0, 255).astype(np.uint8)
43
 
44
  generated_image[i, j] = new_pixel_color
45