Spaces:
Running on Zero
Running on Zero
Download features/__init__.py from giangndm/dataset-utils: direct link, hf CLI and curl.
- Browser
- Download file 947 Bytes
-
https://huggingface.co/spaces/giangndm/dataset-utils/resolve/main/features/__init__.py
- Command line
-
hf download hf://spaces/giangndm/dataset-utils/features/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/giangndm/dataset-utils/resolve/main/features/__init__.py
947 Bytes
| """ | |
| Feature tabs of Dataset Utils — every extension goes here. | |
| A feature is a module `features/<name>.py` that defines: | |
| TITLE: str — the tab title | |
| build(ctx: AppContext) -> None — builds the tab's UI and wires its events | |
| Long-running work must NOT run inside a Gradio event: write it as a job generator | |
| def my_job(token: str, *, ..., progress=lambda *a, **k: None): | |
| yield status_md, log_text[, preview] # repeatedly; FAILED_PREFIX marks failure | |
| and submit it from the tab with `core.jobs.submit_job(...)`, returning | |
| `(message, job_id)` into `[<status markdown>, ctx.submitted_job]`. The 📋 Jobs tab | |
| (`core/jobs_tab.py`) then shows its progress / log and can cancel it. | |
| To add a feature: create the module and append it to `FEATURES` (tab order). | |
| """ | |
| from . import audio_compress, gigaspeech2_convert, text_extract | |
| FEATURES = [text_extract, audio_compress, gigaspeech2_convert] | |