heerjtdev commited on
Commit
1e50058
·
verified ·
1 Parent(s): ee597c6

Update working_yolo_pipeline.py

Browse files
Files changed (1) hide show
  1. working_yolo_pipeline.py +9 -0
working_yolo_pipeline.py CHANGED
@@ -2365,6 +2365,15 @@ def run_document_pipeline(input_pdf_path: str, layoutlmv3_model_path: str, struc
2365
 
2366
  preprocessed_json_path = os.path.join(temp_pipeline_dir, f"{pdf_name}_preprocessed.json")
2367
  raw_output_path = os.path.join(temp_pipeline_dir, f"{pdf_name}_raw_predictions.json")
 
 
 
 
 
 
 
 
 
2368
 
2369
  final_result = None
2370
  try:
 
2365
 
2366
  preprocessed_json_path = os.path.join(temp_pipeline_dir, f"{pdf_name}_preprocessed.json")
2367
  raw_output_path = os.path.join(temp_pipeline_dir, f"{pdf_name}_raw_predictions.json")
2368
+
2369
+
2370
+ # If the user didn't provide a path, create one in the temp directory
2371
+ if structured_intermediate_output_path is None:
2372
+ structured_intermediate_output_path = os.path.join(
2373
+ temp_pipeline_dir, f"{pdf_name}_structured_intermediate.json"
2374
+ )
2375
+
2376
+
2377
 
2378
  final_result = None
2379
  try: