Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -498,10 +498,10 @@ def answer_question(user_question, chatbot, audio=None):
|
|
498 |
chatbot.append((user_question,img))
|
499 |
#print(chatbot)
|
500 |
if "send email to" in user_question:
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
except Exception as e:
|
506 |
print(f"Error loading image file: {e}")
|
507 |
chatbot.append((user_question, "Chart generation failed. Please try again."))
|
|
|
498 |
chatbot.append((user_question,img))
|
499 |
#print(chatbot)
|
500 |
if "send email to" in user_question:
|
501 |
+
try:
|
502 |
+
os.remove(image_path) # Clean up the temporary image file
|
503 |
+
except Exception as e:
|
504 |
+
print(f"Error cleaning up image file: {e}")
|
505 |
except Exception as e:
|
506 |
print(f"Error loading image file: {e}")
|
507 |
chatbot.append((user_question, "Chart generation failed. Please try again."))
|