Spaces:
Runtime error
Runtime error
Remove item() method for probs tensor
Browse files
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]*100)
|
12 |
for out in output:
|
13 |
val = output[out]
|
14 |
if val < 60:
|