AIOmarRehan commited on
Commit
4d65594
·
verified ·
1 Parent(s): 4ecc63d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -21,10 +21,9 @@ def preprocess_image(image, target_size=(192, 176)):
21
 
22
  # Salt-and-pepper noise function
23
  def add_salt_and_pepper_noise(image, amount=0.05):
24
- """
25
- image: PIL Image in grayscale ('L') or RGB
26
- amount: fraction of pixels to corrupt
27
- """
28
  img_array = np.array(image)
29
  # Salt noise
30
  num_salt = np.ceil(amount * img_array.size * 0.5)
 
21
 
22
  # Salt-and-pepper noise function
23
  def add_salt_and_pepper_noise(image, amount=0.05):
24
+ # image: PIL Image in grayscale ('L') or RGB
25
+ # amount: fraction of pixels to corrupt
26
+
 
27
  img_array = np.array(image)
28
  # Salt noise
29
  num_salt = np.ceil(amount * img_array.size * 0.5)