Spaces:
Running
Running
| title: README | |
| emoji: π | |
| colorFrom: red | |
| colorTo: indigo | |
| sdk: static | |
| pinned: false | |
| # UV Scripts | |
| **Run a data or ML task over a Hugging Face dataset in one command β for humans and agents.** | |
| Each recipe is a single self-contained [UV script](https://docs.astral.sh/uv/guides/scripts/): dependencies are declared inline, so you run it straight from a URL β no clone, no virtualenv, no `pip install`. Run it locally with `uv run`, or hand it to [Hugging Face Jobs](https://huggingface.co/docs/hub/jobs) for a managed GPU. Most recipes read a Hub dataset and write a new one, so they chain into pipelines. | |
| ## Quickstart | |
| **See every recipe** β locally, no GPU or token: | |
| ```bash | |
| uv run https://huggingface.co/datasets/uv-scripts/jobs-utils/raw/main/list-recipes.py | |
| ``` | |
| **Run one on a GPU** β the flagship, OCR an image dataset to text: | |
| ```bash | |
| hf jobs uv run --flavor l4x1 --secrets HF_TOKEN \ | |
| https://huggingface.co/datasets/uv-scripts/ocr/raw/main/glm-ocr.py \ | |
| davanstrien/ufo-ColPali your-username/ufo-ocr --max-samples 10 | |
| ``` | |
| One command β a new dataset with a `markdown` column. Pay-per-second, no hardware of your own. | |
| ## Drive it with your coding agent | |
| Recipes take their arguments in the same `input output` order and run from a URL, so an agent (Claude Code, Cursor, β¦) can pick one and run it with no setup. The simplest start β paste this so it discovers what's available: | |
| ``` | |
| List the uv-scripts recipes and tell me which fit my task: | |
| uv run https://huggingface.co/datasets/uv-scripts/jobs-utils/raw/main/list-recipes.py | |
| For context on how these work, read the org page https://huggingface.co/uv-scripts | |
| and the GitHub repo https://github.com/davanstrien/uv-scripts-for-ai. | |
| ``` | |
| <details> | |
| <summary><b>More prompts β run a job, build a dataset β</b></summary> | |
| **Try it now** β runs a real OCR job and hands back a dataset: | |
| ``` | |
| Using uv-scripts, OCR a sample dataset on Hugging Face Jobs: | |
| hf jobs uv run --flavor l4x1 --secrets HF_TOKEN \ | |
| https://huggingface.co/datasets/uv-scripts/ocr/raw/main/glm-ocr.py \ | |
| davanstrien/ufo-ColPali $MY_HF_USERNAME/ufo-ocr-test --max-samples 10 | |
| Then open the output dataset and show me the `markdown` column. | |
| ``` | |
| **Put it to work** β when you need data for a task: | |
| ``` | |
| I need a dataset for <my task>. uv-scripts has recipes that create, OCR, | |
| transcribe, classify, deduplicate, and embed datasets on Hugging Face. List them: | |
| uv run https://huggingface.co/datasets/uv-scripts/jobs-utils/raw/main/list-recipes.py | |
| Pick the one that fits, read its script header for the arguments, and run it with: | |
| hf jobs uv run --flavor l4x1 --secrets HF_TOKEN <script-url> INPUT_DATASET OUTPUT_DATASET | |
| Each recipe reads a Hub dataset and writes a new one, so chain them as needed. | |
| Background: https://huggingface.co/uv-scripts and https://github.com/davanstrien/uv-scripts-for-ai | |
| ``` | |
| The cookbook also ships a ready-made **agent skill** for discovering and running recipes β see the [GitHub repo](https://github.com/davanstrien/uv-scripts-for-ai), and Hugging Face's own [`hf` CLI skill for agents](https://huggingface.co/docs/hub/agents-cli). _(We'll refine these prompts over time.)_ | |
| </details> | |
| ## Browse | |
| Every recipe is in the list below β OCR, detection & segmentation, audio transcription, NER & classification, embeddings & atlas maps, batch LLM/VLM inference, synthetic data, and dataset creation. Or browse on **[GitHub](https://github.com/davanstrien/uv-scripts-for-ai)** Β· run `hf jobs hardware` for GPU flavors & pricing. | |