Spaces:
Running
on
L4
Running
on
L4
Update app.py
#95
by
Imaginator2024
- opened
app.py
CHANGED
|
@@ -75,7 +75,7 @@ def load_and_preprocess_image(base64_image, convert_to='RGB', has_alpha=False):
|
|
| 75 |
image_tensor = torch.from_numpy(image_array)[None,]
|
| 76 |
return image_tensor
|
| 77 |
|
| 78 |
-
def load_and_resize_image(base64_image, convert_to='RGB', max_size=
|
| 79 |
"""Load and preprocess a base64 image, resize if necessary."""
|
| 80 |
image = read_base64_image(base64_image)
|
| 81 |
image = image.convert(convert_to)
|
|
|
|
| 75 |
image_tensor = torch.from_numpy(image_array)[None,]
|
| 76 |
return image_tensor
|
| 77 |
|
| 78 |
+
def load_and_resize_image(base64_image, convert_to='RGB', max_size=2000):
|
| 79 |
"""Load and preprocess a base64 image, resize if necessary."""
|
| 80 |
image = read_base64_image(base64_image)
|
| 81 |
image = image.convert(convert_to)
|