Spaces:
Sleeping
Sleeping
Download src/captioning/utils/__init__.py from apoorvrajdev/image-captioning-api: direct link, hf CLI and curl.
- Browser
- Download file 654 Bytes
-
https://huggingface.co/spaces/apoorvrajdev/image-captioning-api/resolve/main/src/captioning/utils/__init__.py
- Command line
-
hf download hf://spaces/apoorvrajdev/image-captioning-api/src/captioning/utils/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/apoorvrajdev/image-captioning-api/resolve/main/src/captioning/utils/__init__.py
654 Bytes
| """Utils — cross-cutting helpers used by every other sub-package. | |
| Kept deliberately small. If a "util" grows past a single function, that's a | |
| signal it belongs in its own package, not here. | |
| logging.py structlog setup (JSON in prod, pretty in dev) | |
| seed.py ``set_global_seed`` for reproducibility | |
| hashing.py ``sha256_file`` for the paper-notebook freeze check | |
| """ | |
| from captioning.utils.hashing import sha256_file | |
| from captioning.utils.logging import configure_logging, get_logger | |
| from captioning.utils.seed import set_global_seed | |
| __all__ = [ | |
| "configure_logging", | |
| "get_logger", | |
| "set_global_seed", | |
| "sha256_file", | |
| ] | |