Text Classification
Transformers
Safetensors
Laya
English
system-one
calibrated-decisions
rlcd
typed-decisions
classification
agent-observability
invoice-processing
security-incidents
customer-service
commercial-use
Instructions to use binoykunhi/laya-typed-decisions-endpoint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use binoykunhi/laya-typed-decisions-endpoint with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="binoykunhi/laya-typed-decisions-endpoint")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("binoykunhi/laya-typed-decisions-endpoint", device_map="auto") - Laya
How to use binoykunhi/laya-typed-decisions-endpoint with Laya:
# 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 handler.py from binoykunhi/laya-typed-decisions-endpoint: direct link, hf CLI and curl.
- Browser
- Download file 530 Bytes
-
https://huggingface.co/binoykunhi/laya-typed-decisions-endpoint/resolve/fbefb2d175df7314582b29c4e3168c5a1c5f0b7e/handler.py
- Command line
-
hf download hf://binoykunhi/laya-typed-decisions-endpoint@fbefb2d175df7314582b29c4e3168c5a1c5f0b7e/handler.py
-
curl -L -o handler.py https://huggingface.co/binoykunhi/laya-typed-decisions-endpoint/resolve/fbefb2d175df7314582b29c4e3168c5a1c5f0b7e/handler.py
530 Bytes
| import os | |
| os.environ.setdefault("USE_TF", "0") | |
| import laya | |
| class EndpointHandler: | |
| def __init__(self, path=""): | |
| self.agent = laya.load(path) | |
| def __call__(self, data): | |
| payload = data.get("inputs", data) | |
| state = payload.get("state") | |
| questions = payload.get("questions") | |
| if state is None or questions is None: | |
| raise ValueError( | |
| "Request must contain inputs.state and inputs.questions" | |
| ) | |
| return self.agent.predict(state, questions) |