Florent Gbelidji commited on
Sync DeepSeek OCR HF job code
Browse files- ds_batch_ocr/stages.py +10 -8
ds_batch_ocr/stages.py
CHANGED
|
@@ -185,13 +185,13 @@ def _dataset_features() -> Features:
|
|
| 185 |
"document_with_boxes_image_path": Value("string"),
|
| 186 |
"raw_response_path": Value("string"),
|
| 187 |
"source_image_path": Value("string"),
|
| 188 |
-
"figures": Sequence(
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
),
|
| 195 |
}
|
| 196 |
)
|
| 197 |
|
|
@@ -245,6 +245,8 @@ def _push_dataset_records(
|
|
| 245 |
record,
|
| 246 |
)
|
| 247 |
continue
|
|
|
|
|
|
|
| 248 |
|
| 249 |
sample_id = _coerce_to_str(record.get("sample_id", ""))
|
| 250 |
try:
|
|
@@ -279,7 +281,7 @@ def _push_dataset_records(
|
|
| 279 |
),
|
| 280 |
"raw_response_path": _coerce_to_str(record.get("raw_response_path")),
|
| 281 |
"source_image_path": _coerce_to_str(record.get("source_image_path")),
|
| 282 |
-
|
| 283 |
}
|
| 284 |
)
|
| 285 |
|
|
|
|
| 185 |
"document_with_boxes_image_path": Value("string"),
|
| 186 |
"raw_response_path": Value("string"),
|
| 187 |
"source_image_path": Value("string"),
|
| 188 |
+
# "figures": Sequence(
|
| 189 |
+
# {
|
| 190 |
+
# "figure_id": Value("string"),
|
| 191 |
+
# "image_path": Value("string"),
|
| 192 |
+
# "description": Value("string"),
|
| 193 |
+
# }
|
| 194 |
+
# ),
|
| 195 |
}
|
| 196 |
)
|
| 197 |
|
|
|
|
| 245 |
record,
|
| 246 |
)
|
| 247 |
continue
|
| 248 |
+
|
| 249 |
+
print(record)
|
| 250 |
|
| 251 |
sample_id = _coerce_to_str(record.get("sample_id", ""))
|
| 252 |
try:
|
|
|
|
| 281 |
),
|
| 282 |
"raw_response_path": _coerce_to_str(record.get("raw_response_path")),
|
| 283 |
"source_image_path": _coerce_to_str(record.get("source_image_path")),
|
| 284 |
+
#"figures": _normalize_figures(record.get("figures", [])),
|
| 285 |
}
|
| 286 |
)
|
| 287 |
|