Spaces:
Runtime error
Runtime error
File size: 259 Bytes
ef4248d |
1 2 3 4 5 6 7 8 9 10 11 12 |
from transformers import pipeline
def analyze_sentiment(text):
sentiment_analyzer = pipeline("sentiment-analysis")
result = sentiment_analyzer(text)
return result
# Example Usage
analysis = analyze_sentiment("This is amazing!")
print(analysis)
|