Update app.py
Browse files
app.py
CHANGED
@@ -23,13 +23,13 @@ def setup_model(args):
|
|
23 |
def main(img):
|
24 |
|
25 |
# Checking Image Aspect Ratio
|
26 |
-
load_img = Image.open(img)
|
27 |
#image size
|
28 |
-
ratio_width = load_img.size[0]
|
29 |
-
ratio_height = load_img.size[1]
|
30 |
-
print(f"Aspect ratio: {ratio_width}x{ratio_height} px")
|
31 |
-
if ratio_width >= 1026 or ratio_height >= 1026:
|
32 |
-
|
33 |
|
34 |
# setup folder and path
|
35 |
#basewidth = 256
|
|
|
23 |
def main(img):
|
24 |
|
25 |
# Checking Image Aspect Ratio
|
26 |
+
#load_img = Image.open(img)
|
27 |
#image size
|
28 |
+
#ratio_width = load_img.size[0]
|
29 |
+
#ratio_height = load_img.size[1]
|
30 |
+
#print(f"Aspect ratio: {ratio_width}x{ratio_height} px")
|
31 |
+
#if ratio_width >= 1026 or ratio_height >= 1026:
|
32 |
+
# raise gr.Error("Image aspect ratio must not exceed width: 1024 px and height: 1024 px.")
|
33 |
|
34 |
# setup folder and path
|
35 |
#basewidth = 256
|