Anas090 commited on
Commit
97bbece
·
verified ·
1 Parent(s): bc3dd1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.219:
55
- return "Add another image, confidence is below 50%"
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