Spaces:
Build error
Build error
Update app.py
Browse files392 unmodified lines393394395396397398399400401402403404405406407408396397398158 unmodified lines557558559560561574562563564565566567568569570571572573574575576392 unmodified lines # chart = sdf.chat("Can you draw a bar chart with all avaialble item name and quantity.") chart = sdf.chat(question)
# email send if user_email: # Send email with the chart image attached send_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") )
return chart
158 unmodified lines img = f'<img src="data:image/png;base64,{img_str}" style="width:500px; height:400px;">' # image = gr.Image(value=img_str) chatbot.append((user_question, img)) print("user_email") print(user_email)
# email send if user_email: # Send email with the chart image attached send_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-14