Abrar20 commited on
Commit
069137c
·
verified ·
1 Parent(s): ab06675

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -7
app.py CHANGED
@@ -95,13 +95,44 @@ class_names = {
95
 
96
  # Example dictionary of "treatments" for some classes
97
  keras_treatments = {
98
- 'Apple___Apple_scab': "Remove fallen leaves, apply fungicides.",
99
- 'Apple___Black_rot': "Prune out dead branches; apply copper-based fungicide.",
100
- 'Corn___Common_rust': "Use resistant hybrids; apply fungicide if needed.",
101
- 'Corn___Cercospora_leaf_spot Gray_leaf_spot': "Rotate crops; use foliar fungicides.",
102
- 'Potato___Early_blight': "Use certified seeds; apply preventative fungicides.",
103
- 'Tomato___Target_Spot': "Use resistant varieties and mulches to reduce disease.",
104
- # Fallback:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  'Unknown': "No specific treatment available."
106
  }
107
 
 
95
 
96
  # Example dictionary of "treatments" for some classes
97
  keras_treatments = {
98
+ 'Apple___Apple_scab': "Remove fallen leaves and prune infected branches. Apply fungicides containing captan or myclobutanil.",
99
+ 'Apple___Black_rot': "Prune out dead branches. Spray copper-based fungicide during early fruit development.",
100
+ 'Apple___Cedar_apple_rust': "Remove nearby juniper trees. Apply fungicides before bud break.",
101
+ 'Apple___healthy': "No action required. The plant is healthy.",
102
+ 'Blueberry___healthy': "No action required. The plant is healthy.",
103
+ 'Cherry___Powdery_mildew': "Apply sulfur-based fungicide. Ensure good air circulation around the plant.",
104
+ 'Cherry___healthy': "No action required. The plant is healthy.",
105
+ 'Corn___Cercospora_leaf_spot Gray_leaf_spot': "Rotate crops to avoid build-up of pathogens. Use resistant hybrids and apply foliar fungicides.",
106
+ 'Corn___Common_rust': "Plant rust-resistant hybrids. Apply fungicides at the first sign of rust.",
107
+ 'Corn___Northern_Leaf_Blight': "Use resistant varieties and apply fungicides when lesions are observed.",
108
+ 'Corn___healthy': "No action required. The plant is healthy.",
109
+ 'Grape___Black_rot': "Remove and destroy infected leaves and fruits. Apply fungicides containing myclobutanil or captan.",
110
+ 'Grape___Esca_(Black_Measles)': "Prune and destroy infected wood. Apply fungicides during the growing season.",
111
+ 'Grape___Leaf_blight_(Isariopsis_Leaf_Spot)': "Maintain good air circulation. Spray protective fungicides like mancozeb.",
112
+ 'Grape___healthy': "No action required. The plant is healthy.",
113
+ 'Orange___Haunglongbing_(Citrus_greening)': "Remove and destroy infected trees. Control psyllid vectors with insecticides.",
114
+ 'Peach___Bacterial_spot': "Apply copper-based bactericides. Use resistant varieties and avoid overhead irrigation.",
115
+ 'Peach___healthy': "No action required. The plant is healthy.",
116
+ 'Pepper,_bell___Bacterial_spot': "Apply copper-based sprays. Use certified seeds and avoid overhead irrigation.",
117
+ 'Pepper,_bell___healthy': "No action required. The plant is healthy.",
118
+ 'Potato___Early_blight': "Use certified seeds and apply preventative fungicides like chlorothalonil.",
119
+ 'Potato___Late_blight': "Plant disease-free tubers and use fungicides containing metalaxyl.",
120
+ 'Potato___healthy': "No action required. The plant is healthy.",
121
+ 'Raspberry___healthy': "No action required. The plant is healthy.",
122
+ 'Soybean___healthy': "No action required. The plant is healthy.",
123
+ 'Squash___Powdery_mildew': "Use sulfur-based fungicides and ensure good ventilation.",
124
+ 'Strawberry___Leaf_scorch': "Remove infected leaves. Apply fungicides containing myclobutanil.",
125
+ 'Strawberry___healthy': "No action required. The plant is healthy.",
126
+ 'Tomato___Bacterial_spot': "Apply copper-based sprays. Avoid overhead watering.",
127
+ 'Tomato___Early_blight': "Prune infected leaves and apply fungicides containing chlorothalonil or mancozeb.",
128
+ 'Tomato___Late_blight': "Remove infected plants. Apply fungicides containing chlorothalonil or metalaxyl.",
129
+ 'Tomato___Leaf_Mold': "Ensure good ventilation and apply fungicides like mancozeb.",
130
+ 'Tomato___Septoria_leaf_spot': "Remove infected leaves and apply fungicides containing chlorothalonil.",
131
+ 'Tomato___Spider_mites Two-spotted_spider_mite': "Spray insecticidal soap or neem oil. Maintain humidity levels.",
132
+ 'Tomato___Target_Spot': "Use resistant varieties. Apply fungicides containing chlorothalonil.",
133
+ 'Tomato___Tomato_Yellow_Leaf_Curl_Virus': "Remove infected plants. Use resistant varieties and control whitefly vectors.",
134
+ 'Tomato___Tomato_mosaic_virus': "Remove infected plants and disinfect tools. Use resistant seed varieties.",
135
+ 'Tomato___healthy': "No action required. The plant is healthy.",
136
  'Unknown': "No specific treatment available."
137
  }
138