Spaces:
Sleeping
Sleeping
Kryko7
commited on
Commit
·
34dd8e2
1
Parent(s):
ab0d1d6
updated classification threshold
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ categories = {'Dog', 'Cat', 'Bird', 'Koala'}
|
|
9 |
def predict_image(img):
|
10 |
pred, pred_idx, probs = learn.predict(img)
|
11 |
probs_float = probs[0].item()
|
12 |
-
if probs_float > 0.
|
13 |
return dict(zip(categories, map(float, probs)))
|
14 |
else:
|
15 |
return "Not a dog, cat, bird, or koala"
|
|
|
9 |
def predict_image(img):
|
10 |
pred, pred_idx, probs = learn.predict(img)
|
11 |
probs_float = probs[0].item()
|
12 |
+
if probs_float > 0.1:
|
13 |
return dict(zip(categories, map(float, probs)))
|
14 |
else:
|
15 |
return "Not a dog, cat, bird, or koala"
|