Sync from GitHub via hub-sync
Browse files- lighton-ocr2-saturate.py +9 -4
- ovis-ocr2-saturate.py +9 -4
lighton-ocr2-saturate.py
CHANGED
|
@@ -4,6 +4,11 @@
|
|
| 4 |
# "saturate[hf]>=0.1.1",
|
| 5 |
# "pillow>=10",
|
| 6 |
# ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# ///
|
| 8 |
"""
|
| 9 |
Convert document images to markdown using LightOnOCR-2 via saturate.
|
|
@@ -23,11 +28,11 @@ buys over the -server recipe:
|
|
| 23 |
an `[OCR ERROR]` string in the text column; `--retry-errors` re-admits only
|
| 24 |
those rows on a later run.
|
| 25 |
|
| 26 |
-
Run on HF Jobs
|
| 27 |
-
provides the `vllm` binary
|
|
|
|
| 28 |
|
| 29 |
-
hf jobs uv run --detach --
|
| 30 |
-
--image vllm/vllm-openai:latest \\
|
| 31 |
https://huggingface.co/datasets/uv-scripts/ocr/raw/main/lighton-ocr2-saturate.py \\
|
| 32 |
<input-dataset> <output-dataset>
|
| 33 |
|
|
|
|
| 4 |
# "saturate[hf]>=0.1.1",
|
| 5 |
# "pillow>=10",
|
| 6 |
# ]
|
| 7 |
+
#
|
| 8 |
+
# [tool.hf-jobs]
|
| 9 |
+
# image = "vllm/vllm-openai:latest"
|
| 10 |
+
# flavor = "a10g-small"
|
| 11 |
+
# secrets = ["HF_TOKEN"]
|
| 12 |
# ///
|
| 13 |
"""
|
| 14 |
Convert document images to markdown using LightOnOCR-2 via saturate.
|
|
|
|
| 28 |
an `[OCR ERROR]` string in the text column; `--retry-errors` re-admits only
|
| 29 |
those rows on a later run.
|
| 30 |
|
| 31 |
+
Run on HF Jobs. The script starts `vllm serve` itself; its [tool.hf-jobs] header
|
| 32 |
+
declares the image that provides the `vllm` binary, the hardware and the HF_TOKEN
|
| 33 |
+
secret (`hf` CLI 1.32+). Pass --timeout for a long run; flags override the header:
|
| 34 |
|
| 35 |
+
hf jobs uv run --detach --timeout 4h \\
|
|
|
|
| 36 |
https://huggingface.co/datasets/uv-scripts/ocr/raw/main/lighton-ocr2-saturate.py \\
|
| 37 |
<input-dataset> <output-dataset>
|
| 38 |
|
ovis-ocr2-saturate.py
CHANGED
|
@@ -4,6 +4,11 @@
|
|
| 4 |
# "saturate[hf]>=0.1.1",
|
| 5 |
# "pillow>=10",
|
| 6 |
# ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# ///
|
| 8 |
"""
|
| 9 |
Convert document images to markdown using OvisOCR2 via saturate.
|
|
@@ -22,11 +27,11 @@ What that buys over the -server recipe:
|
|
| 22 |
an `[OCR ERROR]` string in the text column; `--retry-errors` re-admits only
|
| 23 |
those rows on a later run.
|
| 24 |
|
| 25 |
-
Run on HF Jobs
|
| 26 |
-
provides the `vllm` binary
|
|
|
|
| 27 |
|
| 28 |
-
hf jobs uv run --detach --
|
| 29 |
-
--image vllm/vllm-openai:latest \\
|
| 30 |
https://huggingface.co/datasets/uv-scripts/ocr/raw/main/ovis-ocr2-saturate.py \\
|
| 31 |
<input-dataset> <output-dataset>
|
| 32 |
|
|
|
|
| 4 |
# "saturate[hf]>=0.1.1",
|
| 5 |
# "pillow>=10",
|
| 6 |
# ]
|
| 7 |
+
#
|
| 8 |
+
# [tool.hf-jobs]
|
| 9 |
+
# image = "vllm/vllm-openai:latest"
|
| 10 |
+
# flavor = "a10g-small"
|
| 11 |
+
# secrets = ["HF_TOKEN"]
|
| 12 |
# ///
|
| 13 |
"""
|
| 14 |
Convert document images to markdown using OvisOCR2 via saturate.
|
|
|
|
| 27 |
an `[OCR ERROR]` string in the text column; `--retry-errors` re-admits only
|
| 28 |
those rows on a later run.
|
| 29 |
|
| 30 |
+
Run on HF Jobs. The script starts `vllm serve` itself; its [tool.hf-jobs] header
|
| 31 |
+
declares the image that provides the `vllm` binary, the hardware and the HF_TOKEN
|
| 32 |
+
secret (`hf` CLI 1.32+). Pass --timeout for a long run; flags override the header:
|
| 33 |
|
| 34 |
+
hf jobs uv run --detach --timeout 4h \\
|
|
|
|
| 35 |
https://huggingface.co/datasets/uv-scripts/ocr/raw/main/ovis-ocr2-saturate.py \\
|
| 36 |
<input-dataset> <output-dataset>
|
| 37 |
|