Anton Bushuiev commited on
Commit
1cf9b61
·
1 Parent(s): 9c42243

Print error messages

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -324,8 +324,9 @@ def predict(models, temp_dir, *inputs):
324
  # Predict
325
  try:
326
  ddg, attn = predict_ddg(models, path, df_sub['Mutation'].tolist(), return_attn=True)
327
- except:
328
- raise gr.Error("Prediction failed. Please double check your inputs.")
 
329
  ddg = ddg.detach().numpy().tolist()
330
 
331
  logging.info(f'Predictions made for {path}')
 
324
  # Predict
325
  try:
326
  ddg, attn = predict_ddg(models, path, df_sub['Mutation'].tolist(), return_attn=True)
327
+ except Exception as e:
328
+ print(f"Prediction failed. {str(e)}")
329
+ raise gr.Error(f"Prediction failed. {str(e)}")
330
  ddg = ddg.detach().numpy().tolist()
331
 
332
  logging.info(f'Predictions made for {path}')