Spaces:
Restarting
on
L4
Restarting
on
L4
lengyue233
commited on
Fix error handling
Browse files
app.py
CHANGED
@@ -141,7 +141,7 @@ def inference(
|
|
141 |
|
142 |
if result == "done":
|
143 |
if payload["success"] is False:
|
144 |
-
|
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)
|