- clarifai
- sentiment-analysis
tweet-sentiment-analysis
Overview
1
Notes
Sentiment Analysis
This workflow uses the Twitter-roBERTa-base which finetuned for sentiment analysis with the TweetEval benchmark
Twitter-roBERTa-base Model
RoBERTa-base model trained on ~124M tweets from January 2018 to December 2021, and finetuned for sentiment analysis with the TweetEval benchmark. This model is suitable for English.
How to use the Financial sentiments Analysis workflow?
Using Clarifai SDK
Export your PAT as an environment variable. Then, import and initialize the API Client.
Find your PAT in your security settings.
export CLARIFAI_PAT={your personal access token}
Prediction with the workflow
from clarifai.client.workflow import Workflow
workflow_url = 'https://clarifai.com/clarifai/sentiment-analysis/workflows/tweet-sentiment-analysis'
text = 'I love this movie and i would watch it again and again!'
prediction = Workflow(workflow_url).predict_by_bytes(text.encode(), input_type="text")
# Get workflow results
print(prediction.results[0].outputs[-1].data)
Using Workflow
To utilize the Sentiment Analysis workflow, you can input text through the Blue Plus Try your own Input button and it will provide whether the sentiment is positive, negative, or neutral.
- Workflow IDtweet-sentiment-analysis
- Description--
- Last UpdatedApr 08, 2024
- PrivacyPUBLIC
- Share