iamomtiwari commited on
Commit
ebaace4
·
verified ·
1 Parent(s): cca355f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
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 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
 
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