Spaces:
Build error
Build error
Update app.py
Browse files392 unmodified lines393394395396397398399400401402403404405406407408409410411158 unmodified lines570571572573574575576577392 unmodified lines# chart = sdf.chat("Can you draw a bar chart with all avaialble item name and quantity.")chart = sdf.chat(question)# 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"))return chart158 unmodified linesimg = 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)if "send email to" in user_question:try:392 unmodified lines393394395396397398158 unmodified lines557558559560561562563564565566567568569570571572573574575576392 unmodified lines# chart = sdf.chat("Can you draw a bar chart with all avaialble item name and quantity.")chart = sdf.chat(question)return chart158 unmodified linesimg = 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 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-14