Spaces:
Build error
Build error
Download vms/utils/parse_bool_env.py from PolygonStew/VideoModelStudio: direct link, hf CLI and curl.
- Browser
- Download file 444 Bytes
-
https://huggingface.co/spaces/PolygonStew/VideoModelStudio/resolve/55a4bb8fd3956b1fed025a35018e7cdca4e82175/vms/utils/parse_bool_env.py
- Command line
-
hf download hf://spaces/PolygonStew/VideoModelStudio@55a4bb8fd3956b1fed025a35018e7cdca4e82175/vms/utils/parse_bool_env.py
-
curl -L -o parse_bool_env.py https://huggingface.co/spaces/PolygonStew/VideoModelStudio/resolve/55a4bb8fd3956b1fed025a35018e7cdca4e82175/vms/utils/parse_bool_env.py
444 Bytes
| from typing import Any, Optional, Dict, List, Union, Tuple | |
| def parse_bool_env(env_value: Optional[str]) -> bool: | |
| """Parse environment variable string to boolean | |
| Handles various true/false string representations: | |
| - True: "true", "True", "TRUE", "1", etc | |
| - False: "false", "False", "FALSE", "0", "", None | |
| """ | |
| if not env_value: | |
| return False | |
| return str(env_value).lower() in ('true', '1', 't', 'y', 'yes') | |