Sentiment Analysis [English]
docker pull cargoshipsh/sentiment-en
Automatically detect the language of an input text. This is a roBERTa-base model was provided by Cardiff NLP and trained on ~58M tweets and finetuned for sentiment analysis with the TweetEval benchmark. The model itself is 500MB and needs an aditional 1.5MB for the tokenizer.
Demo
Input
Predicted Sentiment
positive
License
The code for the API wrapper is licensed under MIT License.
System Requirements
Minimum: 1GB RAM, 1 vCPU
Recommended: 2GB RAM, 2 vCPU
API
If you don't want to implement the model all by yourself, no worries. Benefit from our easy to use API and get started right away!
Get StartedUsage
Input [POST]
{
"text": "I like you."
}
Output
{
"sentiment": "positive"
}
You need to set an API Key via the environment variable API_KEY
to run the image and set the X-API-KEY
header in your request with the same KEY.
Need a more detailed setup guide?
To get more detailed instructions how to get started please check out our quick start guide in the docs.
Example
Make sure you have Docker installed then run the following command:
docker run -p 80:80 --env API_KEY=CHANGE_ME cargoshipsh/sentiment-en
In a new terminal window, run the following command to call the API
curl -X POST -H 'Content-type: application/json' -H 'X-API-Key: CHANGE_ME' --data '{"text":"I like you!"}' http://localhost:80
You see the output of the model in the terminal.
{"sentiment":"positive"}