Redmind commited on
Commit
72f3118
·
verified ·
1 Parent(s): f08b1e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- 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."))
 
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."))