Spaces:
Sleeping
Sleeping
File size: 318 Bytes
dc762fd | 1 2 3 4 5 6 7 8 9 10 11 12 13 | from transformers import pipeline
classifier = pipeline("text-classification")
def llm_agent(observation):
result = classifier(observation)[0]['label'].lower()
if "spam" in result:
return "spam"
elif "important" in result:
return "important"
else:
return "normal" |