Spaces:
Running
Running
File size: 3,524 Bytes
571b640 0dd5d28 d0813ca 0dd5d28 87deff1 0dd5d28 87deff1 d0813ca 87deff1 d0813ca 87deff1 0dd5d28 d0813ca 70ec35c 0dd5d28 87deff1 d0813ca cfa22d9 5e7afcf cfa22d9 5e7afcf d0813ca 5e7afcf d0813ca 5e7afcf d0813ca 5e7afcf d0813ca cfa22d9 d0813ca 5e7afcf 87deff1 92cc155 87deff1 5e7afcf 87deff1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | ---
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.
|