Download formscout/serving/__init__.py from build-small-hackathon/small-functional-movement-screening: direct link, hf CLI and curl.
- Browser
- Download file 739 Bytes
-
https://huggingface.co/spaces/build-small-hackathon/small-functional-movement-screening/resolve/main/formscout/serving/__init__.py
- Command line
-
hf download hf://spaces/build-small-hackathon/small-functional-movement-screening/formscout/serving/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/build-small-hackathon/small-functional-movement-screening/resolve/main/formscout/serving/__init__.py
739 Bytes
| """Serving backends for the FormScout judge/classifier VLM.""" | |
| from __future__ import annotations | |
| def get_vlm_client(): | |
| """Return the VLM client for the resolved judge backend. | |
| transformers (in-process, ZeroGPU) on a Space; llama-server locally. Falls | |
| back to the llama.cpp client if the transformers backend can't be imported. | |
| """ | |
| from formscout import config | |
| if config.resolve_judge_backend() == "transformers": | |
| try: | |
| from formscout.serving.transformers_vlm import TransformersVLMClient | |
| return TransformersVLMClient() | |
| except Exception: | |
| pass | |
| from formscout.serving.llama_cpp import LlamaCppClient | |
| return LlamaCppClient(port=config.LLAMA_CPP_PORT_VLM) | |