Spaces:
Running
on
Zero
Running
on
Zero
2025-07-31 23:26 π
Browse files
app.py
CHANGED
@@ -183,7 +183,7 @@ def transform(image: Image.Image, dataset_name: str) -> Tensor:
|
|
183 |
base=32
|
184 |
)
|
185 |
if new_height != image_height or new_width != image_width:
|
186 |
-
image_tensor = TF.resize(image_tensor, size=(new_height, new_width), interpolation=TF.InterpolationMode.
|
187 |
|
188 |
image_tensor = TF.normalize(image_tensor, mean=mean, std=std)
|
189 |
return image_tensor.unsqueeze(0) # Add batch dimension
|
|
|
183 |
base=32
|
184 |
)
|
185 |
if new_height != image_height or new_width != image_width:
|
186 |
+
image_tensor = TF.resize(image_tensor, size=(new_height, new_width), interpolation=TF.InterpolationMode.BICUBIC, antialias=True)
|
187 |
|
188 |
image_tensor = TF.normalize(image_tensor, mean=mean, std=std)
|
189 |
return image_tensor.unsqueeze(0) # Add batch dimension
|