SkalskiP commited on
Commit
fcb4afd
1 Parent(s): 2bdfd2c
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -38,7 +38,7 @@ def classify_image(input_image) -> str:
38
  padding=True).to(device)
39
  outputs = model(**inputs)
40
  probs = outputs.logits_per_image.softmax(dim=1)
41
- class_index = np.argmax(probs.detach().numpy())
42
  return imagenet_classes[class_index]
43
 
44
 
 
38
  padding=True).to(device)
39
  outputs = model(**inputs)
40
  probs = outputs.logits_per_image.softmax(dim=1)
41
+ class_index = np.argmax(probs.detach().cpu().numpy())
42
  return imagenet_classes[class_index]
43
 
44