Neurolingua commited on
Commit
44d0ab9
1 Parent(s): 783400a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -64,7 +64,7 @@ def whatsapp_webhook():
64
  filename = f"{uuid.uuid4()}.jpg"
65
  filepath = os.path.join(UPLOAD_FOLDER, filename)
66
 
67
- try:
68
  with open(filepath, 'wb') as out_file:
69
  shutil.copyfileobj(r.raw, out_file)
70
 
@@ -78,9 +78,7 @@ def whatsapp_webhook():
78
  response_text = predict_disease(filepath)
79
  else:
80
  response_text = "Please specify if you want to detect a pest or a disease."
81
- except Exception as e:
82
- print(f"Error processing image: {e}")
83
- response_text = 'Error processing image.'
84
  else:
85
  response_text = "The attached file is not an image. Please send an image for classification."
86
  elif 'bookkeeping' in incoming_msg:
 
64
  filename = f"{uuid.uuid4()}.jpg"
65
  filepath = os.path.join(UPLOAD_FOLDER, filename)
66
 
67
+ if 1==1:
68
  with open(filepath, 'wb') as out_file:
69
  shutil.copyfileobj(r.raw, out_file)
70
 
 
78
  response_text = predict_disease(filepath)
79
  else:
80
  response_text = "Please specify if you want to detect a pest or a disease."
81
+
 
 
82
  else:
83
  response_text = "The attached file is not an image. Please send an image for classification."
84
  elif 'bookkeeping' in incoming_msg: