root commited on
Commit
9883b85
·
1 Parent(s): 2886d7d
Files changed (1) hide show
  1. app.py +1 -1
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
  # =========================