Instructions to use botezx/flagtldr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Grok
How to use botezx/flagtldr with Grok:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download classifier/src/xaddons_classifier/backends/__init__.py from botezx/flagtldr: direct link, hf CLI and curl.
- Browser
- Download file 623 Bytes
-
https://huggingface.co/botezx/flagtldr/resolve/main/classifier/src/xaddons_classifier/backends/__init__.py
- Command line
-
hf download hf://botezx/flagtldr/classifier/src/xaddons_classifier/backends/__init__.py
-
curl -L -o __init__.py https://huggingface.co/botezx/flagtldr/resolve/main/classifier/src/xaddons_classifier/backends/__init__.py
623 Bytes
| from __future__ import annotations | |
| from typing import Protocol | |
| from ..spec import LabelSet, Post, Result | |
| class Backend(Protocol): | |
| name: str | |
| async def classify(self, ls: LabelSet, posts: list[Post]) -> dict[str, Result]: ... | |
| def get_backend(name: str, **kw) -> Backend: | |
| if name == "rules": | |
| from .rules import RulesBackend | |
| return RulesBackend() | |
| if name == "basal": | |
| from .basal import BasalBackend | |
| return BasalBackend(**kw) | |
| if name == "embed": | |
| from .embed import EmbedBackend | |
| return EmbedBackend(**kw) | |
| raise ValueError(f"unknown backend: {name}") | |