Spaces:
Sleeping
Sleeping
fix: remove leftover margin_pct from _run_job signature and call
Browse files
app.py
CHANGED
|
@@ -33,7 +33,7 @@ MAX_PDF_MB = 50
|
|
| 33 |
|
| 34 |
|
| 35 |
def _run_job(job_id: str, pdf_path: str, page_from: int, page_to: int,
|
| 36 |
-
|
| 37 |
try:
|
| 38 |
pages = extract_pages(pdf_path, page_from, page_to, password)
|
| 39 |
if not pages:
|
|
@@ -119,7 +119,7 @@ async def extract(
|
|
| 119 |
loop.run_in_executor(
|
| 120 |
_executor,
|
| 121 |
_run_job,
|
| 122 |
-
job_id, pdf_path, page_from, page_to,
|
| 123 |
)
|
| 124 |
|
| 125 |
return JSONResponse({"job_id": job_id})
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
def _run_job(job_id: str, pdf_path: str, page_from: int, page_to: int,
|
| 36 |
+
default_unit: str, password: str):
|
| 37 |
try:
|
| 38 |
pages = extract_pages(pdf_path, page_from, page_to, password)
|
| 39 |
if not pages:
|
|
|
|
| 119 |
loop.run_in_executor(
|
| 120 |
_executor,
|
| 121 |
_run_job,
|
| 122 |
+
job_id, pdf_path, page_from, page_to, default_unit, password,
|
| 123 |
)
|
| 124 |
|
| 125 |
return JSONResponse({"job_id": job_id})
|