Spaces:
Running
Running
Commit
Β·
92cc155
1
Parent(s):
5e7afcf
update readme
Browse files
README.md
CHANGED
|
@@ -18,8 +18,9 @@ Run state-of-the-art ML workflows with a single command. From OCR to classificat
|
|
| 18 |
UV scripts are self-contained Python scripts that use [inline metadata](https://docs.astral.sh/uv/guides/scripts/) to specify dependencies. Just `uv run script.py` and everything installs automatically.
|
| 19 |
|
| 20 |
Perfect for:
|
| 21 |
-
|
| 22 |
-
-
|
|
|
|
| 23 |
- π **Reproducible pipelines** that work anywhere
|
| 24 |
|
| 25 |
## π Quick Example
|
|
@@ -38,39 +39,39 @@ hf jobs uv run --flavor l4x1 \
|
|
| 38 |
|
| 39 |
## π Browse Scripts
|
| 40 |
|
| 41 |
-
| Script Collection
|
| 42 |
-
|
| 43 |
-
| [ocr](https://huggingface.co/datasets/uv-scripts/ocr)
|
| 44 |
-
| [classification](https://huggingface.co/datasets/uv-scripts/classification)
|
| 45 |
-
| [dataset-creation](https://huggingface.co/datasets/uv-scripts/dataset-creation) | Create datasets from PDFs and files
|
| 46 |
-
| [vllm](https://huggingface.co/datasets/uv-scripts/vllm)
|
| 47 |
|
| 48 |
## π― Why UV Scripts?
|
| 49 |
|
| 50 |
### Zero Setup
|
| 51 |
-
No virtual environments, no dependency conflicts, no installation steps. UV handles everything automatically when you run the script.
|
| 52 |
|
| 53 |
-
|
| 54 |
-
These aren't demos - they're production-quality tools used by the community for real ML workflows.
|
| 55 |
|
| 56 |
### GPU Optimized
|
| 57 |
-
Seamlessly run on local GPUs or scale to cloud with HF Jobs. Same script, different compute.
|
| 58 |
|
| 59 |
-
|
| 60 |
-
Browse scripts, contribute your own, and learn from the best practices of the ML community.
|
| 61 |
|
| 62 |
## π Featured Scripts
|
| 63 |
|
| 64 |
### OCR Any Document Dataset
|
|
|
|
| 65 |
Extract text from images with state-of-the-art accuracy:
|
|
|
|
| 66 |
```bash
|
| 67 |
# Handles LaTeX, tables, forms, handwriting
|
| 68 |
uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/nanonets-ocr.py \
|
| 69 |
your-images extracted-text
|
| 70 |
```
|
| 71 |
|
| 72 |
-
### Classify with Guaranteed Valid Outputs
|
|
|
|
| 73 |
Text classification that always returns valid labels:
|
|
|
|
| 74 |
```bash
|
| 75 |
# Uses vLLM's structured generation - no invalid outputs!
|
| 76 |
uv run https://huggingface.co/datasets/uv-scripts/classification/raw/main/classify-dataset.py \
|
|
@@ -81,11 +82,13 @@ uv run https://huggingface.co/datasets/uv-scripts/classification/raw/main/classi
|
|
| 81 |
## π Getting Started
|
| 82 |
|
| 83 |
1. **Install UV** (one-time setup):
|
|
|
|
| 84 |
```bash
|
| 85 |
curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 86 |
```
|
| 87 |
|
| 88 |
2. **Run any script**:
|
|
|
|
| 89 |
```bash
|
| 90 |
uv run https://huggingface.co/datasets/uv-scripts/[collection]/raw/main/[script].py
|
| 91 |
```
|
|
@@ -98,6 +101,7 @@ uv run https://huggingface.co/datasets/uv-scripts/classification/raw/main/classi
|
|
| 98 |
## π€ Contributing
|
| 99 |
|
| 100 |
We welcome scripts that:
|
|
|
|
| 101 |
- Solve real ML problems
|
| 102 |
- Include clear documentation
|
| 103 |
- Follow UV best practices
|
|
@@ -108,9 +112,9 @@ Submit your scripts as PRs to the relevant collection or propose a new collectio
|
|
| 108 |
## π Learn More
|
| 109 |
|
| 110 |
- [UV Documentation](https://docs.astral.sh/uv/)
|
| 111 |
-
- [HF Jobs Guide](https://huggingface.co/docs/
|
| 112 |
- [Script Examples](https://github.com/astral-sh/uv/tree/main/scripts)
|
| 113 |
|
| 114 |
---
|
| 115 |
|
| 116 |
-
|
|
|
|
| 18 |
UV scripts are self-contained Python scripts that use [inline metadata](https://docs.astral.sh/uv/guides/scripts/) to specify dependencies. Just `uv run script.py` and everything installs automatically.
|
| 19 |
|
| 20 |
Perfect for:
|
| 21 |
+
|
| 22 |
+
- π **GPU workflows** on [HF Jobs](https://huggingface.co/docs/huggingface_hub/guides/jobs)
|
| 23 |
+
- π» **Local processing** on your machine
|
| 24 |
- π **Reproducible pipelines** that work anywhere
|
| 25 |
|
| 26 |
## π Quick Example
|
|
|
|
| 39 |
|
| 40 |
## π Browse Scripts
|
| 41 |
|
| 42 |
+
| Script Collection | Description | GPU Required |
|
| 43 |
+
| ------------------------------------------------------------------------------- | --------------------------------------------------------- | ------------ |
|
| 44 |
+
| [ocr](https://huggingface.co/datasets/uv-scripts/ocr) | Extract text from images with VLMs (LaTeX, tables, forms) | β
|
|
| 45 |
+
| [classification](https://huggingface.co/datasets/uv-scripts/classification) | Text classification with guaranteed valid outputs | β
|
|
| 46 |
+
| [dataset-creation](https://huggingface.co/datasets/uv-scripts/dataset-creation) | Create datasets from PDFs and files | β |
|
| 47 |
+
| [vllm](https://huggingface.co/datasets/uv-scripts/vllm) | High-performance inference with vLLM | β
|
|
| 48 |
|
| 49 |
## π― Why UV Scripts?
|
| 50 |
|
| 51 |
### Zero Setup
|
|
|
|
| 52 |
|
| 53 |
+
No virtual environments, no dependency conflicts, no installation steps. UV handles everything automatically when you run the script.
|
|
|
|
| 54 |
|
| 55 |
### GPU Optimized
|
|
|
|
| 56 |
|
| 57 |
+
Seamlessly run on local GPUs or scale to cloud with HF Jobs. Same script, different compute.
|
|
|
|
| 58 |
|
| 59 |
## π Featured Scripts
|
| 60 |
|
| 61 |
### OCR Any Document Dataset
|
| 62 |
+
|
| 63 |
Extract text from images with state-of-the-art accuracy:
|
| 64 |
+
|
| 65 |
```bash
|
| 66 |
# Handles LaTeX, tables, forms, handwriting
|
| 67 |
uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/nanonets-ocr.py \
|
| 68 |
your-images extracted-text
|
| 69 |
```
|
| 70 |
|
| 71 |
+
### Classify with Guaranteed Valid Outputs
|
| 72 |
+
|
| 73 |
Text classification that always returns valid labels:
|
| 74 |
+
|
| 75 |
```bash
|
| 76 |
# Uses vLLM's structured generation - no invalid outputs!
|
| 77 |
uv run https://huggingface.co/datasets/uv-scripts/classification/raw/main/classify-dataset.py \
|
|
|
|
| 82 |
## π Getting Started
|
| 83 |
|
| 84 |
1. **Install UV** (one-time setup):
|
| 85 |
+
|
| 86 |
```bash
|
| 87 |
curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 88 |
```
|
| 89 |
|
| 90 |
2. **Run any script**:
|
| 91 |
+
|
| 92 |
```bash
|
| 93 |
uv run https://huggingface.co/datasets/uv-scripts/[collection]/raw/main/[script].py
|
| 94 |
```
|
|
|
|
| 101 |
## π€ Contributing
|
| 102 |
|
| 103 |
We welcome scripts that:
|
| 104 |
+
|
| 105 |
- Solve real ML problems
|
| 106 |
- Include clear documentation
|
| 107 |
- Follow UV best practices
|
|
|
|
| 112 |
## π Learn More
|
| 113 |
|
| 114 |
- [UV Documentation](https://docs.astral.sh/uv/)
|
| 115 |
+
- [HF Jobs Guide](https://huggingface.co/docs/huggingface_hub/guides/jobs)
|
| 116 |
- [Script Examples](https://github.com/astral-sh/uv/tree/main/scripts)
|
| 117 |
|
| 118 |
---
|
| 119 |
|
| 120 |
+
_UV Scripts is a community project showcasing the power of [UV](https://github.com/astral-sh/uv) for ML workflows._
|