Spaces:
Build error
Build error
Update app.py
Browse files561 unmodified lines562563564565566567568569570571572573574575576577578579580561 unmodified linesmatch = re.search(email_pattern, user_question)if match:user_email = match.group() # Return the matched emailprint("user_email")print(user_email)# email sendif user_email:# Send email with the chart image attachedsend_email_with_attachment(recipient_email=user_email,subject="Warehouse Inventory Report",body=response.get("output", "").split(":")[0],image_data = img_str# attachment_path=chart_path#attachment_path=os.getenv("IMAGE_PATH"))if "send email to" in user_question:try:561 unmodified lines562563564565566567568569570571572573574575576577578579580561 unmodified linesmatch = re.search(email_pattern, user_question)if match:user_email = match.group() # Return the matched emailprint("user_email")print(user_email)# email sendif user_email:# Send email with the chart image attachedsend_email_with_attachment(recipient_email=user_email,subject="Warehouse Inventory Report",body=response.get("output", "").split(":")[0],image_data = img_str# attachment_path=chart_path#attachment_path=os.getenv("IMAGE_PATH"))if "send email to" in user_question:try:
app.py+13-13