Spaces:
Runtime error
Runtime error
Download app/core/logging.py from openscopelabs/cctv-object-detection: direct link, hf CLI and curl.
- Browser
- Download file 470 Bytes
-
https://huggingface.co/spaces/openscopelabs/cctv-object-detection/resolve/main/app/core/logging.py
- Command line
-
hf download hf://spaces/openscopelabs/cctv-object-detection/app/core/logging.py
-
curl -L -o logging.py https://huggingface.co/spaces/openscopelabs/cctv-object-detection/resolve/main/app/core/logging.py
470 Bytes
| import logging | |
| import sys | |
| def setup_logging(level: str = "INFO") -> None: | |
| root = logging.getLogger() | |
| if root.handlers: | |
| return | |
| h = logging.StreamHandler(sys.stdout) | |
| h.setFormatter(logging.Formatter( | |
| "%(asctime)s %(levelname)s %(name)s | %(message)s", | |
| datefmt="%H:%M:%S", | |
| )) | |
| root.addHandler(h) | |
| root.setLevel(getattr(logging, level.upper(), logging.INFO)) | |
| logging.getLogger("ultralytics").setLevel(logging.WARNING) | |