Spaces:
Sleeping
Sleeping
| 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" |