CogSphere / textsentiment.py
CognitiveScience's picture
Rename textsentiment to textsentiment.py
64e1ab8
raw
history blame
No virus
184 Bytes
from transformers import pipeline
classifier = pipeline("sentiment-analysis", model="stevhliu/my_awesome_model")
def getresult(text1):
result1=classifier(text1)
return result1