mmek commited on
Commit
3de9223
·
1 Parent(s): 77c1868

add model transforms

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -16,9 +16,7 @@ def classify_health(input_img):
16
  with torch.no_grad():
17
  image = data_transforms(input_img).unsqueeze(0)
18
  output = model(image)
19
- print(output)
20
- print(output.shape)
21
- probs = torch.nn.functional.softmax(model(image)[0], dim=0)
22
  idx = probs.argmax(dim=1)
23
  return dict(zip(categories, map(float, probs[0])))
24
 
 
16
  with torch.no_grad():
17
  image = data_transforms(input_img).unsqueeze(0)
18
  output = model(image)
19
+ probs = torch.nn.functional.softmax(output, dim=1)
 
 
20
  idx = probs.argmax(dim=1)
21
  return dict(zip(categories, map(float, probs[0])))
22