Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -64,12 +64,20 @@ def whatsapp_webhook():
|
|
64 |
response_text="Your report for bookkeeping saved successfully."
|
65 |
elif 'none' not in filepath:
|
66 |
if predict_pest(filepath):
|
67 |
-
|
|
|
|
|
|
|
68 |
response_text = predict_pest(filepath)
|
69 |
|
70 |
|
71 |
elif predict_disease(filepath):
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
73 |
else:
|
74 |
response_text = "Please upload other image with good quality."
|
75 |
else:
|
|
|
64 |
response_text="Your report for bookkeeping saved successfully."
|
65 |
elif 'none' not in filepath:
|
66 |
if predict_pest(filepath):
|
67 |
+
res=predict_pest(filepath)
|
68 |
+
if res=='x' or res=='X':
|
69 |
+
response_text ='APHIDS'
|
70 |
+
else:
|
71 |
response_text = predict_pest(filepath)
|
72 |
|
73 |
|
74 |
elif predict_disease(filepath):
|
75 |
+
res=predict_disease(filepath)
|
76 |
+
if res=='x' or res=='X':
|
77 |
+
response_text ='APHIDS'
|
78 |
+
else:
|
79 |
+
response_text = predict_disease(filepath)
|
80 |
+
|
81 |
else:
|
82 |
response_text = "Please upload other image with good quality."
|
83 |
else:
|