omar87 commited on
Commit
7858a05
·
1 Parent(s): 287373b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,8 +8,8 @@ import io
8
 
9
  # Function to calculate SSIM between two images
10
  def calculate_ssim(img1, img2):
11
- img1_gray = Image.open(io.BytesIO(img1.read())).convert("L")
12
- img2_gray = Image.open(io.BytesIO(img2.read())).convert("L")
13
  return ssim(img1_gray, img2_gray)
14
 
15
 
 
8
 
9
  # Function to calculate SSIM between two images
10
  def calculate_ssim(img1, img2):
11
+ img1_gray = Image.open(img1).convert("L")
12
+ img2_gray = Image.open(img2).convert("L")
13
  return ssim(img1_gray, img2_gray)
14
 
15