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
File size: 623 Bytes
043267b | 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 | 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}")
|