morinop commited on
Commit
f17ecc5
1 Parent(s): 2aaad1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,6 +25,7 @@ def print_bn():
25
  def update_bn(image):
26
  cursor_im = 0
27
  print("Before Resize:", image.shape)
 
28
  image = T.Resize((40,40))(image)
29
  image = image.reshape(-1)
30
  print("After Resize:", image.shape)
@@ -56,9 +57,9 @@ def greet(image):
56
  print(image.min(), image.max())
57
  image = image/255.0
58
  image = image.unsqueeze(0)
 
59
  update_bn(image)
60
  print(image.shape)
61
- image = torch.permute(image, [0,3,1,2])
62
  out = model(image)
63
  # model.train()
64
  return "Hello world!"
 
25
  def update_bn(image):
26
  cursor_im = 0
27
  print("Before Resize:", image.shape)
28
+
29
  image = T.Resize((40,40))(image)
30
  image = image.reshape(-1)
31
  print("After Resize:", image.shape)
 
57
  print(image.min(), image.max())
58
  image = image/255.0
59
  image = image.unsqueeze(0)
60
+ image = torch.permute(image, [0,3,1,2])
61
  update_bn(image)
62
  print(image.shape)
 
63
  out = model(image)
64
  # model.train()
65
  return "Hello world!"