File size: 436 Bytes
53aeebd
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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})")