Florent Gbelidji commited on
Sync DeepSeek OCR HF job code
Browse files- ds_batch_ocr/stages.py +3 -3
ds_batch_ocr/stages.py
CHANGED
|
@@ -235,10 +235,10 @@ def run_stage_extract(settings: ExtractSettings) -> None:
|
|
| 235 |
#write document with boxes image to file
|
| 236 |
img_draw.save(ctx["sample_dir"] / "document_with_boxes.png")
|
| 237 |
|
| 238 |
-
document_path = document_path.relative_to(settings.output_dir)
|
| 239 |
-
raw_response_path = raw_response_path.relative_to(settings.output_dir)
|
| 240 |
source_image_path = (ctx["sample_dir"] / "source.png").relative_to(settings.output_dir)
|
| 241 |
-
document_with_boxes_path = (ctx["sample_dir"] / "document_with_boxes.png").relative_to(settings.output_dir)
|
| 242 |
|
| 243 |
|
| 244 |
|
|
|
|
| 235 |
#write document with boxes image to file
|
| 236 |
img_draw.save(ctx["sample_dir"] / "document_with_boxes.png")
|
| 237 |
|
| 238 |
+
document_path = settings.output_dir.name / document_path.relative_to(settings.output_dir)
|
| 239 |
+
raw_response_path = settings.output_dir.name / raw_response_path.relative_to(settings.output_dir)
|
| 240 |
source_image_path = (ctx["sample_dir"] / "source.png").relative_to(settings.output_dir)
|
| 241 |
+
document_with_boxes_path = settings.output_dir.name / (ctx["sample_dir"] / "document_with_boxes.png").relative_to(settings.output_dir)
|
| 242 |
|
| 243 |
|
| 244 |
|