cardiffnlp/twitter-roberta-base-emotion cover image

cardiffnlp/twitter-roberta-base-emotion

A model trained on approximately 58 million tweets and fine-tuned for emotion recognition using the TweetEval benchmark. The model achieves high accuracy on various emotion classification tasks, including emojii, emotion, hate, irony, offensive, sentiment, stance/abortion, stance/atheism, stance/climate, stance/feminist, and stance/hillary.

A model trained on approximately 58 million tweets and fine-tuned for emotion recognition using the TweetEval benchmark. The model achieves high accuracy on various emotion classification tasks, including emojii, emotion, hate, irony, offensive, sentiment, stance/abortion, stance/atheism, stance/climate, stance/feminist, and stance/hillary.

Public
$0.0005 / sec

HTTP/cURL API

You can use cURL or any other http client to run inferences:

curl -X POST \
    -d '{"input": "I had a wonderful day!"}'  \
    -H "Authorization: bearer $DEEPINFRA_TOKEN"  \
    -H 'Content-Type: application/json'  \
    'https://api.deepinfra.com/v1/inference/cardiffnlp/twitter-roberta-base-emotion'

which will give you back something similar to:

{
  "results": [
    {
      "label": "POSITIVE",
      "score": 0.9998832941055298
    },
    {
      "label": "NEGATIVE",
      "score": 0.00011671594256768003
    }
  ],
  "request_id": null,
  "inference_status": {
    "status": "unknown",
    "runtime_ms": 0,
    "cost": 0.0,
    "tokens_generated": 0,
    "tokens_input": 0
  }
}

Input fields

inputstring

text to classify


webhookfile

The webhook to call when inference is done, by default you will get the output in the response of your inference request

Input Schema

Output Schema