Spaces:
Running
on
Zero
Running
on
Zero
Anton Bushuiev
commited on
Commit
·
1cf9b61
1
Parent(s):
9c42243
Print error messages
Browse files
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 |
-
|
|
|
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}')
|