Download code/agt/masks/verifiers/__init__.py from MRBSTUDIO/AGT: direct link, hf CLI and curl.
- Browser
- Download file 645 Bytes
-
https://huggingface.co/MRBSTUDIO/AGT/resolve/main/code/agt/masks/verifiers/__init__.py
- Command line
-
hf download hf://MRBSTUDIO/AGT/code/agt/masks/verifiers/__init__.py
-
curl -L -o __init__.py https://huggingface.co/MRBSTUDIO/AGT/resolve/main/code/agt/masks/verifiers/__init__.py
645 Bytes
| from __future__ import annotations | |
| from pathlib import Path | |
| from typing import Protocol | |
| class Verifier(Protocol): | |
| def send_page(self, page_dir: Path, prompt: str, schema: dict, maximum_retries: int) -> dict: | |
| ... | |
| def _qwen(settings: dict, device: str) -> Verifier: | |
| from .qwen import QwenVerifier | |
| return QwenVerifier(settings["model"], device, revision=settings.get("revision"), | |
| enable_thinking=settings.get("enable_thinking", False)) | |
| FACTORIES = {"qwen": _qwen} | |
| def build_verifier(settings: dict, device: str = "cuda") -> Verifier: | |
| return FACTORIES[settings["verifier"]](settings, device) | |