Spaces:
Running
Running
Update working_yolo_pipeline.py
Browse files- working_yolo_pipeline.py +6 -6
working_yolo_pipeline.py
CHANGED
|
@@ -2734,17 +2734,17 @@ def run_document_pipeline(input_pdf_path: str, layoutlmv3_model_path: str, struc
|
|
| 2734 |
|
| 2735 |
# -------------------------------------------------------------------------
|
| 2736 |
# --- COMMENTED OUT OLD LAYOUTLMV3 CALL FOR REVERSION ---
|
| 2737 |
-
|
| 2738 |
-
|
| 2739 |
-
|
| 2740 |
# -------------------------------------------------------------------------
|
| 2741 |
|
| 2742 |
# --- NEW CUSTOM MODEL CALL ---
|
| 2743 |
# Note: We only pass the JSON path because the custom function
|
| 2744 |
# doesn't need to re-read the PDF or use the layoutlmv3 model path.
|
| 2745 |
-
page_raw_predictions_list = run_custom_inference_and_get_raw_words(
|
| 2746 |
-
|
| 2747 |
-
)
|
| 2748 |
# -----------------------------
|
| 2749 |
|
| 2750 |
if not page_raw_predictions_list:
|
|
|
|
| 2734 |
|
| 2735 |
# -------------------------------------------------------------------------
|
| 2736 |
# --- COMMENTED OUT OLD LAYOUTLMV3 CALL FOR REVERSION ---
|
| 2737 |
+
page_raw_predictions_list = run_inference_and_get_raw_words(
|
| 2738 |
+
input_pdf_path, layoutlmv3_model_path, preprocessed_json_path_out
|
| 2739 |
+
)
|
| 2740 |
# -------------------------------------------------------------------------
|
| 2741 |
|
| 2742 |
# --- NEW CUSTOM MODEL CALL ---
|
| 2743 |
# Note: We only pass the JSON path because the custom function
|
| 2744 |
# doesn't need to re-read the PDF or use the layoutlmv3 model path.
|
| 2745 |
+
# page_raw_predictions_list = run_custom_inference_and_get_raw_words(
|
| 2746 |
+
# preprocessed_json_path_out
|
| 2747 |
+
# )
|
| 2748 |
# -----------------------------
|
| 2749 |
|
| 2750 |
if not page_raw_predictions_list:
|