dlflannery commited on
Commit
d414f03
·
verified ·
1 Parent(s): f54a54d

Update app.py

Browse files

Enhanced AI fail error msg

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -963,8 +963,8 @@ def chat(prompt, user_window, pwd_window, past, response, gptModel, uploaded_ima
963
  uploaded_image_file, uploaded_file_path)
964
  uploaded_image_file = ''
965
  uploaded_file_path = ''
966
- except:
967
- return [[], "Sorry, there was an error getting the AI response",
968
  prompt, gptModel, uploaded_image_file, plot, image_out, file_out, uploaded_file_path]
969
 
970
  image_done = False
 
963
  uploaded_image_file, uploaded_file_path)
964
  uploaded_image_file = ''
965
  uploaded_file_path = ''
966
+ except Exception as e:
967
+ return [[], f"Sorry, there was an error ({str(e)}) getting the AI response",
968
  prompt, gptModel, uploaded_image_file, plot, image_out, file_out, uploaded_file_path]
969
 
970
  image_done = False