iamomtiwari commited on
Commit
74aa40d
·
verified ·
1 Parent(s): 5f5775f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -9,20 +9,20 @@ feature_extractor = ViTFeatureExtractor.from_pretrained("iamomtiwari/VITPEST")
9
 
10
  # Define class labels and treatment advice
11
  class_labels = {
12
- "Corn___Common_Rust": "Apply fungicides as soon as symptoms are noticed. Practice crop rotation and remove infected plants.",
13
- "Corn___Gray_Leaf_Spot": "Rotate crops to non-host plants, apply resistant varieties, and use fungicides as needed.",
14
- "Corn___Healthy": "Continue good agricultural practices: ensure proper irrigation, nutrient supply, and monitor for pests.",
15
- "Corn___Northern_Leaf_Blight": "Remove and destroy infected plant debris, apply fungicides, and rotate crops.",
16
- "Rice___Brown_Spot": "Use resistant varieties, improve field drainage, and apply fungicides if necessary.",
17
- "Rice___Healthy": "Maintain proper irrigation, fertilization, and pest control measures.",
18
- "Rice___Leaf_Blast": "Use resistant varieties, apply fungicides during high-risk periods, and practice good field management.",
19
- "Rice___Neck_Blast": "Plant resistant varieties, improve nutrient management, and apply fungicides if symptoms appear.",
20
- "Wheat___Brown_Rust": "Apply fungicides and practice crop rotation with non-host crops.",
21
- "Wheat___Healthy": "Continue with good management practices, including proper fertilization and weed control.",
22
- "Wheat___Yellow_Rust": "Use resistant varieties, apply fungicides, and rotate crops.",
23
- "Sugarcane__Red_Rot": "Plant resistant varieties and ensure good drainage.",
24
- "Sugarcane__Healthy": "Maintain healthy soil conditions and proper irrigation.",
25
- "Sugarcane__Bacterial Blight": "Use disease-free planting material, practice crop rotation, and destroy infected plants."
26
  }
27
 
28
  # Mapping label indices to class labels
 
9
 
10
  # Define class labels and treatment advice
11
  class_labels = {
12
+ 0:"Corn___Common_Rust": "Apply fungicides as soon as symptoms are noticed. Practice crop rotation and remove infected plants.",
13
+ 1:"Corn___Gray_Leaf_Spot": "Rotate crops to non-host plants, apply resistant varieties, and use fungicides as needed.",
14
+ 2:"Corn___Healthy": "Continue good agricultural practices: ensure proper irrigation, nutrient supply, and monitor for pests.",
15
+ 3:"Corn___Northern_Leaf_Blight": "Remove and destroy infected plant debris, apply fungicides, and rotate crops.",
16
+ 4:"Rice___Brown_Spot": "Use resistant varieties, improve field drainage, and apply fungicides if necessary.",
17
+ 5:"Rice___Healthy": "Maintain proper irrigation, fertilization, and pest control measures.",
18
+ 6:"Rice___Leaf_Blast": "Use resistant varieties, apply fungicides during high-risk periods, and practice good field management.",
19
+ 7:"Rice___Neck_Blast": "Plant resistant varieties, improve nutrient management, and apply fungicides if symptoms appear.",
20
+ 8:"Wheat___Brown_Rust": "Apply fungicides and practice crop rotation with non-host crops.",
21
+ 9:"Wheat___Healthy": "Continue with good management practices, including proper fertilization and weed control.",
22
+ 10:"Wheat___Yellow_Rust": "Use resistant varieties, apply fungicides, and rotate crops.",
23
+ 11:"Sugarcane__Red_Rot": "Plant resistant varieties and ensure good drainage.",
24
+ 12:"Sugarcane__Healthy": "Maintain healthy soil conditions and proper irrigation.",
25
+ 13:"Sugarcane__Bacterial Blight": "Use disease-free planting material, practice crop rotation, and destroy infected plants."
26
  }
27
 
28
  # Mapping label indices to class labels