Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ learn_inf = load_learner('bear_classifier_cat')
|
|
6 |
def bear_classifier(image):
|
7 |
pred,pred_idx,probs = learn_inf.predict(image)
|
8 |
pred_name = f"Prediction: {pred}"
|
9 |
-
pred_prob = f"Probability: {probs[pred_idx]}"
|
10 |
return pred_name, pred_prob
|
11 |
|
12 |
|
|
|
6 |
def bear_classifier(image):
|
7 |
pred,pred_idx,probs = learn_inf.predict(image)
|
8 |
pred_name = f"Prediction: {pred}"
|
9 |
+
pred_prob = f"Probability: {probs[pred_idx]:.04f}"
|
10 |
return pred_name, pred_prob
|
11 |
|
12 |
|