Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -61,9 +61,9 @@ def load_model_hf(repo_id, filename, ckpt_config_filename, device='cpu'):
|
|
61 |
|
62 |
def transform_image(image) -> torch.Tensor:
|
63 |
transform = T.Compose([
|
64 |
-
|
65 |
T.ToTensor(),
|
66 |
-
|
67 |
])
|
68 |
|
69 |
image_transformed, _ = transform(image, None)
|
|
|
61 |
|
62 |
def transform_image(image) -> torch.Tensor:
|
63 |
transform = T.Compose([
|
64 |
+
T.RandomResize([800], max_size=1333),
|
65 |
T.ToTensor(),
|
66 |
+
T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
|
67 |
])
|
68 |
|
69 |
image_transformed, _ = transform(image, None)
|