Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,8 +42,8 @@ for model_key, config in MODEL_CONFIGS.items():
|
|
| 42 |
max_tokens = 2000
|
| 43 |
|
| 44 |
def resizeImage(image):
|
| 45 |
-
if image.height >
|
| 46 |
-
image = image.resize((int(image.width *
|
| 47 |
return image
|
| 48 |
|
| 49 |
@spaces.GPU
|
|
|
|
| 42 |
max_tokens = 2000
|
| 43 |
|
| 44 |
def resizeImage(image):
|
| 45 |
+
if image.height > 1500:
|
| 46 |
+
image = image.resize((int(image.width * 1500 / image.height), 1500), Image.Resampling.LANCZOS)
|
| 47 |
return image
|
| 48 |
|
| 49 |
@spaces.GPU
|