Update app.py
Browse files
app.py
CHANGED
@@ -39,8 +39,9 @@ def greet(image):
|
|
39 |
# print(image.min(), image.max())
|
40 |
# image = image/255.0
|
41 |
transform_nor = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.4914, 0.4822, 0.4465), (0.247, 0.243, 0.261))])
|
42 |
-
|
43 |
-
image = image.
|
|
|
44 |
print(image.shape)
|
45 |
image = torch.permute(image, [0,3,1,2])
|
46 |
image = transform_nor(image)
|
|
|
39 |
# print(image.min(), image.max())
|
40 |
# image = image/255.0
|
41 |
transform_nor = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.4914, 0.4822, 0.4465), (0.247, 0.243, 0.261))])
|
42 |
+
|
43 |
+
image = image[np.newaxis,:,:,:]
|
44 |
+
# image = image.unsqueeze(0)
|
45 |
print(image.shape)
|
46 |
image = torch.permute(image, [0,3,1,2])
|
47 |
image = transform_nor(image)
|