Spidartist commited on
Commit
b687777
·
1 Parent(s): 9a82fe2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -100,8 +100,8 @@ def ant_genus_classification(image):
100
  print(image.shape)
101
  with torch.no_grad():
102
  y_hat = model(image)
103
- y_hat = torch.nn.functional.softmax(y_hat, dim=1)
104
- preds = torch.argmax(y_hat, dim=1)
105
  print(preds.shape)
106
 
107
  confidences = {class_to_idx[i]: float(preds[i]) for i in range(len(classes))}
 
100
  print(image.shape)
101
  with torch.no_grad():
102
  y_hat = model(image)
103
+ preds = torch.nn.functional.softmax(y_hat, dim=1)
104
+ # preds = torch.argmax(preds, dim=1)
105
  print(preds.shape)
106
 
107
  confidences = {class_to_idx[i]: float(preds[i]) for i in range(len(classes))}