Text Classification
Transformers
Safetensors
English
nli
cross-encoder
qwen3.5
reranker
image-text-to-text
Instructions to use AlexWortega/openjev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlexWortega/openjev with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="AlexWortega/openjev")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AlexWortega/openjev", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download code/serving/check_prompt_templates.py from AlexWortega/openjev: direct link, hf CLI and curl.
- Browser
- Download file 1.83 kB
-
https://huggingface.co/AlexWortega/openjev/resolve/main/code/serving/check_prompt_templates.py
- Command line
-
hf download hf://AlexWortega/openjev/code/serving/check_prompt_templates.py
-
curl -L -o check_prompt_templates.py https://huggingface.co/AlexWortega/openjev/resolve/main/code/serving/check_prompt_templates.py
1.83 kB
| import unittest | |
| import numpy as np | |
| from decisions_api import assemble, build_plan | |
| from prompt_templates import build_prompt_plan, finish_answers | |
| class PromptChecks(unittest.TestCase): | |
| def test_default_is_identical_and_explicit_rubrics_preserved(self): | |
| body = {"model":"m", "state":"Facts.", "questions":{ | |
| "b":{"type":"noul","instructions":"Claim.","criteria":{"true":"Supported.","false":"Refuted."}}, | |
| "c":{"type":"choice","instructions":"Pick.","criteria":{"a":"Alpha.","b":"Beta."}}}} | |
| old = build_plan(body) | |
| p = build_prompt_plan(body) | |
| self.assertEqual(old.pairs, p.pairs) | |
| e = np.array([.2,.8,.7,.1]) | |
| self.assertEqual(assemble(old,e), finish_answers(p,e)) | |
| direct = build_prompt_plan(body,"direct_noul") | |
| self.assertEqual(old.pairs,direct.pairs) | |
| plain = build_prompt_plan(body,"unquoted") | |
| self.assertIn("Alpha.",plain.pairs[2][1]) | |
| def test_direct_boolean_and_following_option_offsets(self): | |
| body = {"model":"m", "state":"Facts.", "questions":{ | |
| "b":{"type":"noul","instructions":"Claim."}, | |
| "c":{"type":"choice","instructions":"Pick.","criteria":{"a":"Alpha.","b":"Beta."}}}} | |
| p = build_prompt_plan(body,"direct_noul") | |
| self.assertEqual(len(p.pairs),3) | |
| self.assertEqual(p.pairs[0][1],"Claim.") | |
| out=finish_answers(p,[.1,.2,.8]) | |
| self.assertEqual(out["b"]["noul"],.1) | |
| self.assertEqual(out["c"]["choice"],"b") | |
| def test_multiwindow_assertion_uses_any_support(self): | |
| body={"model":"m","state":"x"*25000,"questions":{"b":{"type":"noul","instructions":"Claim."}}} | |
| p=build_prompt_plan(body,"direct_noul") | |
| self.assertEqual(finish_answers(p,[.1,.9])["b"]["noul"],.9) | |
| if __name__ == "__main__": | |
| unittest.main() | |