File size: 451 Bytes
c7fe0d5
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from joblib import load

classifier = load("capability-classifier.joblib")

examples = [
    "Break a complex objective into subtasks and replan after failure",
    "Use a browser and API to complete the task",
    "Predict how the environment will change before acting"
]

for text in examples:
    label = classifier.predict([text])[0]
    confidence = classifier.predict_proba([text])[0].max()
    print(f"{text}\n  -> {label} ({confidence:.2f})")