asquirous commited on
Commit
9e88ff0
·
1 Parent(s): 9daccd9

Fix tensor accessing technique

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ def classify_image(img):
8
  img = PILImage.create(img)
9
  pred, idx, probs = learn.predict(img)
10
  output = dict(zip(labels, map(float, probs)))
11
- print(probs[0])
12
  for out in output:
13
  val = output[out]
14
  if val < 60:
 
8
  img = PILImage.create(img)
9
  pred, idx, probs = learn.predict(img)
10
  output = dict(zip(labels, map(float, probs)))
11
+ print(probs[0].item())
12
  for out in output:
13
  val = output[out]
14
  if val < 60: