Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,8 +51,8 @@ def predict_image(image_path, model):
|
|
| 51 |
max_confidence = np.max(softmax_output)
|
| 52 |
predicted_class = np.argmax(softmax_output)
|
| 53 |
|
| 54 |
-
if max_confidence < 0.
|
| 55 |
-
return "
|
| 56 |
|
| 57 |
predicted_label = labels[predicted_class]
|
| 58 |
return predicted_label
|
|
|
|
| 51 |
max_confidence = np.max(softmax_output)
|
| 52 |
predicted_class = np.argmax(softmax_output)
|
| 53 |
|
| 54 |
+
if max_confidence < 0.2:
|
| 55 |
+
return "Hmm, it's a bit tricky. Feel free to add another image, and I'll do my best to make a guess!"
|
| 56 |
|
| 57 |
predicted_label = labels[predicted_class]
|
| 58 |
return predicted_label
|