Update app.py
Browse files
app.py
CHANGED
@@ -67,14 +67,13 @@ def response2(image: gr.Image = None,image_size: gr.Slider = 640, conf_threshold
|
|
67 |
conef = round(cone,3)
|
68 |
conef = conef * 100
|
69 |
text += (f"Detected {name[cl]} with confidence {round(conef,1)}% at ({xy[0]},{xy[1]})\n")
|
70 |
-
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
|
79 |
# xywh = int(results.boxes.xywh)
|
80 |
# x = xywh[0]
|
|
|
67 |
conef = round(cone,3)
|
68 |
conef = conef * 100
|
69 |
text += (f"Detected {name[cl]} with confidence {round(conef,1)}% at ({xy[0]},{xy[1]})\n")
|
|
|
70 |
|
71 |
+
if name[cl] == "Corn Rust":
|
72 |
+
solution = solution + "Apply fungicides with active ingredients like propiconazole or tebuconazole when symptoms appear.\n"
|
73 |
+
elif name[cl] == "Gray Leaf Spot":
|
74 |
+
solution = solution + "Use fungicides containing strobilurins (e.g., azoxystrobin) or triazoles.\n"
|
75 |
+
elif name[cl] == "Leaf Blight":
|
76 |
+
solution = solution + "Treat with fungicides such as mancozeb or chlorothalonil during the early stages.\n"
|
77 |
|
78 |
# xywh = int(results.boxes.xywh)
|
79 |
# x = xywh[0]
|