Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,18 +33,17 @@ def analyse(img,plant_type):
|
|
| 33 |
y_pred = y_pred[0]
|
| 34 |
print("y pred",y_pred)
|
| 35 |
|
| 36 |
-
id = np.argmax(y_pred)
|
| 37 |
p_id = plant_label_disease[plant_type.lower()][0]
|
| 38 |
|
| 39 |
for disease in plant_label_disease[plant_type.lower()]:
|
| 40 |
if y_pred[disease] > y_pred[p_id]:
|
| 41 |
p_id = disease
|
| 42 |
|
| 43 |
-
overall_predicted_id =
|
| 44 |
overall_predicted_name = label_disease[str(overall_predicted_id)]
|
| 45 |
overall_predicted_acc = y_pred[overall_predicted_id]
|
| 46 |
|
| 47 |
-
plant_predicted_id =
|
| 48 |
plant_predicted_name = label_disease[str(plant_predicted_id)]
|
| 49 |
plant_predicted_acc = y_pred[plant_predicted_id]
|
| 50 |
|
|
|
|
| 33 |
y_pred = y_pred[0]
|
| 34 |
print("y pred",y_pred)
|
| 35 |
|
|
|
|
| 36 |
p_id = plant_label_disease[plant_type.lower()][0]
|
| 37 |
|
| 38 |
for disease in plant_label_disease[plant_type.lower()]:
|
| 39 |
if y_pred[disease] > y_pred[p_id]:
|
| 40 |
p_id = disease
|
| 41 |
|
| 42 |
+
overall_predicted_id = overall_predicted_id
|
| 43 |
overall_predicted_name = label_disease[str(overall_predicted_id)]
|
| 44 |
overall_predicted_acc = y_pred[overall_predicted_id]
|
| 45 |
|
| 46 |
+
plant_predicted_id =p_id
|
| 47 |
plant_predicted_name = label_disease[str(plant_predicted_id)]
|
| 48 |
plant_predicted_acc = y_pred[plant_predicted_id]
|
| 49 |
|