Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -14,20 +14,20 @@ fallback_feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/res
|
|
14 |
|
15 |
# Define class labels with treatment advice
|
16 |
class_labels = {
|
17 |
-
1: {"label": "Stage
|
18 |
-
2: {"label": "Stage
|
19 |
-
3: {"label": "Stage
|
20 |
-
4: {"label": "Stage
|
21 |
-
5: {"label": "Stage
|
22 |
-
6: {"label": "Stage safe
|
23 |
-
7: {"label": "Stage
|
24 |
-
8: {"label": "Stage
|
25 |
-
9: {"label": "Stage
|
26 |
-
10: {"label": "Stage safe
|
27 |
-
11: {"label": "Stage
|
28 |
-
12: {"label": "Stage
|
29 |
-
13: {"label": "Stage safe
|
30 |
-
14: {"label": "Stage
|
31 |
}
|
32 |
|
33 |
# Mapping label indices to class labels
|
|
|
14 |
|
15 |
# Define class labels with treatment advice
|
16 |
class_labels = {
|
17 |
+
1: {"label": "Stage Corn Common Rust", "treatment": "Apply fungicides as soon as symptoms are noticed. Practice crop rotation and remove infected plants."},
|
18 |
+
2: {"label": "Stage Corn Gray Leaf Spot", "treatment": "Rotate crops to non-host plants, apply resistant varieties, and use fungicides as needed."},
|
19 |
+
3: {"label": "Stage Safe Corn Healthy", "treatment": "Continue good agricultural practices: ensure proper irrigation, nutrient supply, and monitor for pests."},
|
20 |
+
4: {"label": "Stage Corn Northern Leaf Blight", "treatment": "Remove and destroy infected plant debris, apply fungicides, and rotate crops."},
|
21 |
+
5: {"label": "Stage Rice Brown Spot", "treatment": "Use resistant varieties, improve field drainage, and apply fungicides if necessary."},
|
22 |
+
6: {"label": "Stage safe Rice Healthy", "treatment": "Maintain proper irrigation, fertilization, and pest control measures."},
|
23 |
+
7: {"label": "Stage Rice Leaf Blast", "treatment": "Use resistant varieties, apply fungicides during high-risk periods, and practice good field management."},
|
24 |
+
8: {"label": "Stage Rice Neck Blast", "treatment": "Plant resistant varieties, improve nutrient management, and apply fungicides if symptoms appear."},
|
25 |
+
9: {"label": "Stage Sugarcane Bacterial Blight", "treatment": "Use disease-free planting material, practice crop rotation, and destroy infected plants."},
|
26 |
+
10: {"label": "Stage safe Sugarcane Healthy", "treatment": "Maintain healthy soil conditions and proper irrigation."},
|
27 |
+
11: {"label": "Stage Sugarcane Red Rot", "treatment": "Plant resistant varieties and ensure good drainage."},
|
28 |
+
12: {"label": "Stage Wheat Brown_Rust", "treatment": "Apply fungicides and practice crop rotation with non-host crops."},
|
29 |
+
13: {"label": "Stage safe Wheat Healthy", "treatment": "Continue with good management practices, including proper fertilization and weed control."},
|
30 |
+
14: {"label": "Stage Wheat Yellow Rust", "treatment": "Use resistant varieties, apply fungicides, and rotate crops."}
|
31 |
}
|
32 |
|
33 |
# Mapping label indices to class labels
|