from transformers import AutoModel
# 1. Load Plek-1 directly from Hugging Face Hub
model = AutoModel.from_pretrained("Drenel/plek-1", trust_remote_code=True)
# 2. 3-Parameter Directed Decision Classification
result = model.predict(
context="The checkout page crashed with error code 500",
question="Which department should handle this issue?",
choices=["technical", "customer care", "finance", "security", "legal"]
)
print(result["prediction"]) # Output: technical
print(result["confidence"]) # Output: 0.500
print(result["probabilities"]) # Calibrated probability distribution
# 3. 200,000+ Token Ultra-Long Context Processing
huge_document = open("large_contract.txt").read()
long_result = model.predict_long(
long_context=huge_document,
question="What is the overall legal risk level of this agreement?",
choices=["Compliant Contract", "High-Risk Liability", "Non-Binding Terms"]
)