CogSphere / textsentiment.py
CognitiveScience's picture
Update textsentiment.py
0ab31d3
raw
history blame
No virus
187 Bytes
from transformers import pipeline
classifier = pipeline("sentiment-analysis") #, model="stevhliu/my_awesome_model")
def getresult(text1):
result1=classifier(text1)
return result1