Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -98,7 +98,7 @@ def extract_number_from_caption(caption_text: str) -> Optional[str]:
|
|
| 98 |
match = NUMBER_PATTERN.search(caption_text)
|
| 99 |
return match.group(1) if match else None
|
| 100 |
|
| 101 |
-
def detect_layout_regions(page: fitz.Page, target_width: Optional[int] = None, conf_threshold=0.25, iou_threshold=0.
|
| 102 |
"""Use DocLayout-YOLO to detect document elements."""
|
| 103 |
if layout_model is None:
|
| 104 |
raise RuntimeError("Layout model is not initialized.")
|
|
|
|
| 98 |
match = NUMBER_PATTERN.search(caption_text)
|
| 99 |
return match.group(1) if match else None
|
| 100 |
|
| 101 |
+
def detect_layout_regions(page: fitz.Page, target_width: Optional[int] = None, conf_threshold=0.25, iou_threshold=0.3):
|
| 102 |
"""Use DocLayout-YOLO to detect document elements."""
|
| 103 |
if layout_model is None:
|
| 104 |
raise RuntimeError("Layout model is not initialized.")
|