File size: 257 Bytes
ca4ab65
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from transformers import pipeline

classifier = pipeline(task="sentiment-analysis")

user_input = input("Please enter a text to perform sentiment analysis upon:\n")

classification = classifier(user_input)

print("Sentimeny Analysis:")
print(classification)