File size: 339 Bytes
bf53e60 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | from transformers import pipeline
classifier = pipeline(
"text-classification",
model="./model",
tokenizer="./model"
)
while True:
text = input("Say something > ")
if text.lower() in ["exit", "quit"]:
break
result = classifier(text)[0]
print(f"✨ Vibe: {result['label']} ({result['score']:.2f})\n")
|