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
Download hug/lib/python3.12/site-packages/fontTools/misc/lazyTools.py from dl1wjd2/Logistics_AX: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/dl1wjd2/Logistics_AX/resolve/main/hug/lib/python3.12/site-packages/fontTools/misc/lazyTools.py
- Command line
-
hf download hf://dl1wjd2/Logistics_AX/hug/lib/python3.12/site-packages/fontTools/misc/lazyTools.py
-
curl -L -o lazyTools.py https://huggingface.co/dl1wjd2/Logistics_AX/resolve/main/hug/lib/python3.12/site-packages/fontTools/misc/lazyTools.py
1.02 kB
| from collections import UserDict, UserList | |
| __all__ = ["LazyDict", "LazyList"] | |
| class LazyDict(UserDict): | |
| def __init__(self, data): | |
| super().__init__() | |
| self.data = data | |
| def __getitem__(self, k): | |
| v = self.data[k] | |
| if callable(v): | |
| v = v(k) | |
| self.data[k] = v | |
| return v | |
| class LazyList(UserList): | |
| def __getitem__(self, k): | |
| if isinstance(k, slice): | |
| indices = range(*k.indices(len(self))) | |
| return [self[i] for i in indices] | |
| v = self.data[k] | |
| if callable(v): | |
| v = v(k) | |
| self.data[k] = v | |
| return v | |
| def __add__(self, other): | |
| if isinstance(other, LazyList): | |
| other = list(other) | |
| elif isinstance(other, list): | |
| pass | |
| else: | |
| return NotImplemented | |
| return list(self) + other | |
| def __radd__(self, other): | |
| if not isinstance(other, list): | |
| return NotImplemented | |
| return other + list(self) | |