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/ttLib/tables/DefaultTable.py from dl1wjd2/Logistics_AX: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/dl1wjd2/Logistics_AX/resolve/main/hug/lib/python3.12/site-packages/fontTools/ttLib/tables/DefaultTable.py
- Command line
-
hf download hf://dl1wjd2/Logistics_AX/hug/lib/python3.12/site-packages/fontTools/ttLib/tables/DefaultTable.py
-
curl -L -o DefaultTable.py https://huggingface.co/dl1wjd2/Logistics_AX/resolve/main/hug/lib/python3.12/site-packages/fontTools/ttLib/tables/DefaultTable.py
1.99 kB
| from __future__ import annotations | |
| from typing import TYPE_CHECKING | |
| from fontTools.misc.textTools import Tag | |
| from fontTools.ttLib import getClassTag | |
| if TYPE_CHECKING: | |
| from typing import Any | |
| from fontTools.misc.xmlWriter import XMLWriter | |
| from fontTools.ttLib import TTFont | |
| XMLAttrs = dict[str, str] | |
| XMLContent = list[str | tuple[str, XMLAttrs, "XMLContent"]] | |
| class DefaultTable: | |
| dependencies: list[str] = [] | |
| def __init__(self, tag: str | bytes | None = None) -> None: | |
| if tag is None: | |
| tag = getClassTag(self.__class__) | |
| self.tableTag = Tag(tag) | |
| def decompile(self, data: bytes, ttFont: TTFont) -> None: | |
| self.data = data | |
| def compile(self, ttFont: TTFont) -> bytes: | |
| return self.data | |
| def toXML(self, writer: XMLWriter, ttFont: TTFont, **kwargs: Any) -> None: | |
| if hasattr(self, "ERROR"): | |
| writer.comment("An error occurred during the decompilation of this table") | |
| writer.newline() | |
| writer.comment(self.ERROR) | |
| writer.newline() | |
| writer.begintag("hexdata") | |
| writer.newline() | |
| writer.dumphex(self.compile(ttFont)) | |
| writer.endtag("hexdata") | |
| writer.newline() | |
| def fromXML( | |
| self, name: str, attrs: XMLAttrs, content: XMLContent, ttFont: TTFont | |
| ) -> None: | |
| from fontTools import ttLib | |
| from fontTools.misc.textTools import readHex | |
| if name != "hexdata": | |
| raise ttLib.TTLibError("can't handle '%s' element" % name) | |
| self.decompile(readHex(content), ttFont) | |
| def __repr__(self) -> str: | |
| return "<'%s' table at %x>" % (self.tableTag, id(self)) | |
| def __eq__(self, other: object) -> bool: | |
| if type(self) is not type(other): | |
| return NotImplemented | |
| return self.__dict__ == other.__dict__ | |
| def __ne__(self, other: object) -> bool: | |
| result = self.__eq__(other) | |
| return result if result is NotImplemented else not result | |