root
commited on
Commit
·
9883b85
1
Parent(s):
2886d7d
fix
Browse files
app.py
CHANGED
|
@@ -108,7 +108,7 @@ def _call_api(api_url: str, file_path: str, use_layout_detection: bool, prompt_l
|
|
| 108 |
except json.JSONDecodeError:
|
| 109 |
raise gr.Error(f"Invalid JSON response from server:\n{getattr(resp, 'text', '')}")
|
| 110 |
if data.get("errorCode", -1) != 0:
|
| 111 |
-
raise gr.Error(f"API returned an error:
|
| 112 |
return data
|
| 113 |
|
| 114 |
# =========================
|
|
|
|
| 108 |
except json.JSONDecodeError:
|
| 109 |
raise gr.Error(f"Invalid JSON response from server:\n{getattr(resp, 'text', '')}")
|
| 110 |
if data.get("errorCode", -1) != 0:
|
| 111 |
+
raise gr.Error(f"API returned an error:")
|
| 112 |
return data
|
| 113 |
|
| 114 |
# =========================
|