MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / to_bool

Function to_bool

motion_gating/vlm_utils.py:21–32  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

19 candidates.append(block)
20
21 def to_bool(value: Any) -> bool:
22 if isinstance(value, bool):
23 return value
24 if isinstance(value, str):
25 lowered = value.strip().lower()
26 if lowered in {"true", "yes"}:
27 return True
28 if lowered in {"false", "no"}:
29 return False
30 if isinstance(value, (int, float)):
31 return bool(value)
32 return False
33
34 for candidate in candidates:
35 if not candidate:

Callers 1

interpret_vlm_outputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected