Florent Gbelidji commited on
Commit
731e848
·
verified ·
1 Parent(s): e3f62f0

Sync DeepSeek OCR HF job code

Browse files
Files changed (1) hide show
  1. ds_batch_ocr/stages.py +5 -5
ds_batch_ocr/stages.py CHANGED
@@ -254,15 +254,15 @@ def _build_dataset_records(documents: List[Dict[str, Any]]) -> List[Dict[str, An
254
  {
255
  "sample_id": doc.get("sample_id", ""),
256
  "dataset_index": int(doc.get("dataset_index") or 0),
257
- "document_markdown_path": doc.get("document_path", ""),
 
258
  "document_markdown_text": doc.get("document_markdown_text") or "",
 
 
 
259
  "document_final_markdown_path": doc.get("document_final_markdown_path") or "",
260
  "document_final_markdown_text": doc.get("document_final_markdown_text") or "",
261
- "document_with_boxes_image_path": document_with_boxes_relpath,
262
  "raw_response_path": doc.get("raw_response_path", ""),
263
- "source_image_path": doc.get("source_image_path", ""),
264
- "figures": figure_entries,
265
- "figures_metadata": figure_metadata_json,
266
  }
267
  )
268
  return records
 
254
  {
255
  "sample_id": doc.get("sample_id", ""),
256
  "dataset_index": int(doc.get("dataset_index") or 0),
257
+ "source_image_path": doc.get("source_image_path", ""),
258
+ "document_with_boxes_image_path": document_with_boxes_relpath,
259
  "document_markdown_text": doc.get("document_markdown_text") or "",
260
+ "figures": figure_entries,
261
+ "figures_metadata": figure_metadata_json,
262
+ "document_markdown_path": doc.get("document_path", ""),
263
  "document_final_markdown_path": doc.get("document_final_markdown_path") or "",
264
  "document_final_markdown_text": doc.get("document_final_markdown_text") or "",
 
265
  "raw_response_path": doc.get("raw_response_path", ""),
 
 
 
266
  }
267
  )
268
  return records