agent-task-classifier / example_usage.py
ai-systems's picture
Upload 6 files
53aeebd verified
Raw
History Blame Contribute Delete
436 Bytes
from joblib import load
classifier = load("agent-task-classifier.joblib")
examples = [
"Search the web for relevant sources and summarize them",
"Fix a failing test in a Python repository",
"Require human approval before sending the message"
]
for text in examples:
label = classifier.predict([text])[0]
confidence = classifier.predict_proba([text])[0].max()
print(f"{text}\n -> {label} ({confidence:.2f})")