|
# 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 |