Spaces:
Runtime error
Runtime error
Commit
·
c4381f0
1
Parent(s):
fe53139
prob > 88%
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def predict(img):
|
|
22 |
print(pred_idx)
|
23 |
print(probs)
|
24 |
|
25 |
-
if probs[pred_idx] > 0.
|
26 |
message = f"I am {round((float(probs[pred_idx])*100),4)}% confident that the picture you uploaded is me. I am a {pred} bear."
|
27 |
else:
|
28 |
message = f"Hmm.. I know what a bear looks like, considering... but do you? Try uploading an image of a bear, thank you."
|
|
|
22 |
print(pred_idx)
|
23 |
print(probs)
|
24 |
|
25 |
+
if probs[pred_idx] > 0.88:
|
26 |
message = f"I am {round((float(probs[pred_idx])*100),4)}% confident that the picture you uploaded is me. I am a {pred} bear."
|
27 |
else:
|
28 |
message = f"Hmm.. I know what a bear looks like, considering... but do you? Try uploading an image of a bear, thank you."
|