Spaces:
Running
Running
Commit
Β·
a2c1456
1
Parent(s):
ac24b3d
update readme
Browse files
README.md
CHANGED
|
@@ -26,15 +26,10 @@ Perfect for:
|
|
| 26 |
## π Quick Example
|
| 27 |
|
| 28 |
```bash
|
| 29 |
-
# Extract text from images with state-of-the-art OCR
|
| 30 |
-
uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/nanonets-ocr.py \
|
| 31 |
-
your-image-dataset \
|
| 32 |
-
your-extracted-text
|
| 33 |
-
|
| 34 |
-
# Or run on GPU with HF Jobs (no local GPU needed!)
|
| 35 |
hf jobs uv run --flavor l4x1 \
|
| 36 |
https://huggingface.co/datasets/uv-scripts/ocr/raw/main/nanonets-ocr.py \
|
| 37 |
-
your-images your-text
|
| 38 |
```
|
| 39 |
|
| 40 |
## π Browse Scripts
|
|
@@ -64,7 +59,8 @@ Extract text from images with state-of-the-art accuracy:
|
|
| 64 |
|
| 65 |
```bash
|
| 66 |
# Handles LaTeX, tables, forms, handwriting
|
| 67 |
-
uv run
|
|
|
|
| 68 |
your-images extracted-text
|
| 69 |
```
|
| 70 |
|
|
@@ -74,40 +70,26 @@ Text classification that always returns valid labels:
|
|
| 74 |
|
| 75 |
```bash
|
| 76 |
# Uses vLLM's structured generation - no invalid outputs!
|
| 77 |
-
uv run
|
|
|
|
| 78 |
--input-dataset imdb --column text \
|
| 79 |
--labels "positive,negative" --output-dataset imdb-classified
|
| 80 |
```
|
| 81 |
|
| 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 |
-
|
| 93 |
-
uv run https://huggingface.co/datasets/uv-scripts/[collection]/raw/main/[script].py
|
| 94 |
-
```
|
| 95 |
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
## π€ Contributing
|
| 102 |
-
|
| 103 |
-
We welcome scripts that:
|
| 104 |
-
|
| 105 |
-
- Solve real ML problems
|
| 106 |
-
- Include clear documentation
|
| 107 |
-
- Follow UV best practices
|
| 108 |
-
- Work on both local and cloud
|
| 109 |
|
| 110 |
-
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
## π Learn More
|
| 113 |
|
|
|
|
| 26 |
## π Quick Example
|
| 27 |
|
| 28 |
```bash
|
| 29 |
+
# Extract text from images with state-of-the-art OCR (no local GPU needed!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
hf jobs uv run --flavor l4x1 \
|
| 31 |
https://huggingface.co/datasets/uv-scripts/ocr/raw/main/nanonets-ocr.py \
|
| 32 |
+
your-images your-extracted-text
|
| 33 |
```
|
| 34 |
|
| 35 |
## π Browse Scripts
|
|
|
|
| 59 |
|
| 60 |
```bash
|
| 61 |
# Handles LaTeX, tables, forms, handwriting
|
| 62 |
+
hf jobs uv run --flavor l4x1 \
|
| 63 |
+
https://huggingface.co/datasets/uv-scripts/ocr/raw/main/nanonets-ocr.py \
|
| 64 |
your-images extracted-text
|
| 65 |
```
|
| 66 |
|
|
|
|
| 70 |
|
| 71 |
```bash
|
| 72 |
# Uses vLLM's structured generation - no invalid outputs!
|
| 73 |
+
hf jobs uv run --flavor l4x1 \
|
| 74 |
+
https://huggingface.co/datasets/uv-scripts/classification/raw/main/classify-dataset.py \
|
| 75 |
--input-dataset imdb --column text \
|
| 76 |
--labels "positive,negative" --output-dataset imdb-classified
|
| 77 |
```
|
| 78 |
|
| 79 |
+
## π Getting Started with HF Jobs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
+
Run any UV script on GPU infrastructure:
|
|
|
|
|
|
|
| 82 |
|
| 83 |
+
```bash
|
| 84 |
+
hf jobs uv run --flavor l4x1 \
|
| 85 |
+
https://huggingface.co/datasets/uv-scripts/[collection]/raw/main/[script].py \
|
| 86 |
+
[args]
|
| 87 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
+
Choose your GPU flavor:
|
| 90 |
+
- `l4x1` - Good balance for most tasks
|
| 91 |
+
- `a10g-large` - More memory for larger models
|
| 92 |
+
- `a100-large` - Maximum performance
|
| 93 |
|
| 94 |
## π Learn More
|
| 95 |
|