Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def predict_disease(image_file, model, all_labels, target_language):
|
|
34 |
# Predict the class
|
35 |
predictions = model.predict(img_array)
|
36 |
# Validate predictions
|
37 |
-
confidence_threshold = 0.
|
38 |
confidence_scores = predictions[0]
|
39 |
max_confidence = np.max(confidence_scores)
|
40 |
|
|
|
34 |
# Predict the class
|
35 |
predictions = model.predict(img_array)
|
36 |
# Validate predictions
|
37 |
+
confidence_threshold = 0.7 # Require at least 98% confidence
|
38 |
confidence_scores = predictions[0]
|
39 |
max_confidence = np.max(confidence_scores)
|
40 |
|