File size: 1,868 Bytes
cb5bdd5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Dataset Creation Scripts - Development Notes

This repository contains UV scripts for creating Hugging Face datasets from local files.

## Important Configuration

### Dataset Viewer

Since these are script repositories (not actual datasets), we should **disable the dataset viewer** to avoid confusion. Add the following to the dataset card YAML header:

```yaml
---
viewer: false
---
```

This prevents Hugging Face from trying to display the scripts as data, which would be misleading since users are meant to download and run these scripts, not view them as datasets.

Reference: https://huggingface.co/docs/hub/datasets-viewer-configure#disable-the-viewer

## Repository Structure

```
dataset-creation/
β”œβ”€β”€ README.md              # User-facing documentation
β”œβ”€β”€ CLAUDE.md             # Development notes (this file)
β”œβ”€β”€ pdf-to-dataset.py     # PDF processing script
β”œβ”€β”€ pdf-examples/         # Test PDFs for development
└── .gitignore           # Ignore test outputs
```

## Testing

Test locally with:
```bash
uv run pdf-to-dataset.py pdf-examples test-dataset --private
```

## Future Scripts

Potential additions (when needed):
- `images-to-dataset.py` - Process image directories
- `text-to-dataset.py` - Convert text files
- `audio-to-dataset.py` - Process audio files
- `json-to-dataset.py` - Structure JSON data

## Design Decisions

1. **Simple is better**: Scripts use built-in dataset loaders where possible
2. **No GPU required**: These are data preparation scripts, not inference
3. **Direct upload**: Use `push_to_hub` for simplicity
4. **Flexible output**: Upload raw objects (PDFs, images) for user processing

## Maintenance Notes

- Always test scripts with local examples before pushing
- Keep dependencies minimal
- Follow UV script best practices from main CLAUDE.md
- Ensure ruff formatting and linting passes