Instructions to use dl1wjd2/Logistics_AX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use dl1wjd2/Logistics_AX with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("dl1wjd2/Logistics_AX", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
File size: 1,162 Bytes
f5fb003 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
import os
_TRUE_VALUES = frozenset({"1", "true", "yes", "on"})
_FALSE_VALUES = frozenset({"0", "false", "no", "off"})
def envvar_bool(name: str, default: bool = False) -> bool:
"""Read a bool-like environment variable.
Unset, empty, or whitespace-only means ``default``. ``1/true/yes/on`` and
``0/false/no/off`` are recognised case-insensitively, and any other integer
follows C truthiness, so ``2`` is true and ``-0`` is false.
A value that is none of those keeps the historical set-means-true
behaviour rather than raising, because these variables are read during
import and a raise would turn a typo into an import failure.
"""
raw = os.environ.get(name)
if raw is None:
return default
raw = raw.strip()
if not raw:
return default
lowered = raw.lower()
if lowered in _TRUE_VALUES:
return True
if lowered in _FALSE_VALUES:
return False
try:
return int(raw, 0) != 0
except ValueError:
return True
|