lengyue233 commited on
Commit
d3adf53
1 Parent(s): 9bfe4ad

Fix error handling

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -141,7 +141,7 @@ def inference(
141
 
142
  if result == "done":
143
  if payload["success"] is False:
144
- raise payload["response"]
145
  break
146
 
147
  codes.append(result)
 
141
 
142
  if result == "done":
143
  if payload["success"] is False:
144
+ return None, build_html_error_message(payload["error"])
145
  break
146
 
147
  codes.append(result)