Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def get_reader(lang_codes: Tuple[str, ...]) -> "easyocr.Reader":
|
|
43 |
# ----------------------------------------------------------------------
|
44 |
# GPU‑decorated OCR worker (runs ONLY when called)
|
45 |
# ----------------------------------------------------------------------
|
46 |
-
@spaces.GPU(duration=
|
47 |
def run_ocr(pdf_path: str, page_ids: List[int], lang_codes: Tuple[str, ...]) -> List[Tuple[int, str]]:
|
48 |
"""OCR designated pages and return list[(page_num, text)]."""
|
49 |
reader = get_reader(lang_codes)
|
|
|
43 |
# ----------------------------------------------------------------------
|
44 |
# GPU‑decorated OCR worker (runs ONLY when called)
|
45 |
# ----------------------------------------------------------------------
|
46 |
+
@spaces.GPU(duration=60)
|
47 |
def run_ocr(pdf_path: str, page_ids: List[int], lang_codes: Tuple[str, ...]) -> List[Tuple[int, str]]:
|
48 |
"""OCR designated pages and return list[(page_num, text)]."""
|
49 |
reader = get_reader(lang_codes)
|