Spaces:
Running
Running
Commit ·
5ad4f48
1
Parent(s): 9383c1f
Fix: POST to /extract instead of /
Browse files
app.py
CHANGED
|
@@ -225,7 +225,8 @@ def run_backend(files: list[Any] | None) -> dict[str, Any]:
|
|
| 225 |
handle = open(path, "rb")
|
| 226 |
handles.append(handle)
|
| 227 |
upload_files.append(("files", (Path(path).name, handle, "application/pdf")))
|
| 228 |
-
|
|
|
|
| 229 |
response.raise_for_status()
|
| 230 |
return response.json()
|
| 231 |
except requests.RequestException as exc:
|
|
|
|
| 225 |
handle = open(path, "rb")
|
| 226 |
handles.append(handle)
|
| 227 |
upload_files.append(("files", (Path(path).name, handle, "application/pdf")))
|
| 228 |
+
url = f"{AMD_ENDPOINT.rstrip('/')}/extract"
|
| 229 |
+
response = requests.post(url, files=upload_files, headers=headers, timeout=300)
|
| 230 |
response.raise_for_status()
|
| 231 |
return response.json()
|
| 232 |
except requests.RequestException as exc:
|