Update app.py
Browse files
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 |
|