jiang20 commited on
Commit
34c17d5
·
1 Parent(s): 474fcd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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.unsqueeze(0)
 
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)