omar87 commited on
Commit
3200e51
·
1 Parent(s): 623fe69

Update app.py

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