Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def inference(image, size):
|
|
42 |
else:
|
43 |
try:
|
44 |
width, height = image.size
|
45 |
-
if width >=
|
46 |
raise gr.Error("The image is too large.")
|
47 |
result = model8.predict(image.convert('RGB'))
|
48 |
except torch.cuda.OutOfMemoryError as e:
|
|
|
42 |
else:
|
43 |
try:
|
44 |
width, height = image.size
|
45 |
+
if width >= 500000 or height >= 500000:
|
46 |
raise gr.Error("The image is too large.")
|
47 |
result = model8.predict(image.convert('RGB'))
|
48 |
except torch.cuda.OutOfMemoryError as e:
|