NaimaAqeel commited on
Commit
9b319b3
·
verified ·
1 Parent(s): 6e1bd9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -14,7 +14,9 @@ def process_image(image, k):
14
  """Process the uploaded image, compress it using SVD, and return the result."""
15
  # Convert PIL Image to NumPy array
16
  image_np = np.array(image)
17
-
 
 
18
 
19
  # Compress the image
20
  compressed_image = svd_compress(gray_image, k)
 
14
  """Process the uploaded image, compress it using SVD, and return the result."""
15
  # Convert PIL Image to NumPy array
16
  image_np = np.array(image)
17
+
18
+ # Convert to grayscale
19
+ gray_image = color.rgb2gray(image_np)
20
 
21
  # Compress the image
22
  compressed_image = svd_compress(gray_image, k)