Kathir commited on
Commit
217aa89
·
1 Parent(s): 464b22d

Added image

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -35,7 +35,7 @@ def predict(img):
35
  preds = torch.softmax(pred_logits, dim=1)
36
 
37
  # Create a prediction label and prediction probability dictionary for each prediction class
38
- pred_and_prob_labels = {class_names[i]: preds[i].item() for i in range(len(class_names))}
39
 
40
  return pred_and_prob_labels
41
 
 
35
  preds = torch.softmax(pred_logits, dim=1)
36
 
37
  # Create a prediction label and prediction probability dictionary for each prediction class
38
+ pred_and_prob_labels = {class_names[i]: preds[0][i].item() for i in range(len(class_names))}
39
 
40
  return pred_and_prob_labels
41