Download runtime/glance_runtime/__init__.py from bpHigh/glance-0.1: direct link, hf CLI and curl.
- Browser
- Download file 744 Bytes
-
https://huggingface.co/bpHigh/glance-0.1/resolve/main/runtime/glance_runtime/__init__.py
- Command line
-
hf download hf://bpHigh/glance-0.1/runtime/glance_runtime/__init__.py
-
curl -L -o __init__.py https://huggingface.co/bpHigh/glance-0.1/resolve/main/runtime/glance_runtime/__init__.py
744 Bytes
| """Glance runtime: load Glance decision models and answer typed decisions. | |
| from glance_runtime import Glance | |
| glance = Glance.load("bpHigh/glance-0.1", device="cuda") # or device="cpu" | |
| answers = glance( | |
| state={"ticket": "My card was charged twice, please refund one."}, | |
| questions={"team": {"type": "choice", "instructions": "Which team should handle this?", | |
| "criteria": {"billing": "payments and refunds", "tech": "bugs and outages"}}}, | |
| ) | |
| """ | |
| from glance_runtime.infer import DEFAULT_MODEL, Glance, RequestError, make_server | |
| from glance_runtime.vision import encode_image | |
| __all__ = ["DEFAULT_MODEL", "Glance", "RequestError", "encode_image", "make_server"] | |
| __version__ = "0.1.0" | |