Redmind commited on
Commit
d15bbb3
·
verified ·
1 Parent(s): 123ad82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -562,19 +562,19 @@ def answer_question(user_question, chatbot, audio=None):
562
  match = re.search(email_pattern, user_question)
563
  if match:
564
  user_email = match.group() # Return the matched email
565
- print("user_email")
566
- print(user_email)
567
- # email send
568
- if user_email:
569
- # Send email with the chart image attached
570
- send_email_with_attachment(
571
- recipient_email=user_email,
572
- subject="Warehouse Inventory Report",
573
- body=response.get("output", "").split(":")[0],
574
- image_data = img_str
575
- # attachment_path=chart_path
576
- #attachment_path=os.getenv("IMAGE_PATH")
577
- )
578
 
579
  if "send email to" in user_question:
580
  try:
 
562
  match = re.search(email_pattern, user_question)
563
  if match:
564
  user_email = match.group() # Return the matched email
565
+ print("user_email")
566
+ print(user_email)
567
+ # email send
568
+ if user_email:
569
+ # Send email with the chart image attached
570
+ send_email_with_attachment(
571
+ recipient_email=user_email,
572
+ subject="Warehouse Inventory Report",
573
+ body=response.get("output", "").split(":")[0],
574
+ image_data = img_str
575
+ # attachment_path=chart_path
576
+ #attachment_path=os.getenv("IMAGE_PATH")
577
+ )
578
 
579
  if "send email to" in user_question:
580
  try: