Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,7 +51,7 @@ model.eval()
|
|
| 51 |
processor = DPTImageProcessor.from_pretrained("Intel/dpt-swinv2-tiny-256")
|
| 52 |
|
| 53 |
def preprocess_image(image):
|
| 54 |
-
image = cv2.resize(image, (
|
| 55 |
image = torch.from_numpy(image).permute(2, 0, 1).unsqueeze(0).float().to(device)
|
| 56 |
return image / 255.0
|
| 57 |
|
|
|
|
| 51 |
processor = DPTImageProcessor.from_pretrained("Intel/dpt-swinv2-tiny-256")
|
| 52 |
|
| 53 |
def preprocess_image(image):
|
| 54 |
+
image = cv2.resize(image, (200, 200))
|
| 55 |
image = torch.from_numpy(image).permute(2, 0, 1).unsqueeze(0).float().to(device)
|
| 56 |
return image / 255.0
|
| 57 |
|