Skip to main content

04.6.7.1 distilbert-sst-2-int8 (preview)

Node Description

distilbert-sst-2-int8 (preview) - action type node needed to classify a given text and determine its positive or negative "mood".

note

Model ID: @cf/huggingface/distilbert-sst-2-int8. Improved BERT model refined on SST-2 for sentiment classification (determining whether a statement/text is positive or negative)

Text classification using artificial intelligence has several important applications. Among them is sentiment analysis - determining whether the emotional tone or mood expressed in a text is positive or negative. This is useful in the following cases:

  1. Improving customer experience: Analyzing feedback, reviews, and customer service interactions to identify pain points and improve products/services.
  1. Brand/Reputation Monitoring: Tracking the public's emotional response to a company, product, or public figure on social media and news.
  1. Market Research: Understanding how consumers feel about different topics, trends, or competitors in an industry.

Node Configuration

The Text field is required to configure the distilbert-sst-2-int8 (preview) node.

Text

Text field to be filled in. The text can be filled in manually or be the result of previous nodes.

Example of launching a node

Let's start the distilbert-sst-2-int8 (preview) node to process the text and generate a response.

Example text:Paul Atreides looked at his planet one last time.Here was the salty sea that had humbly sharpened the gray rocks year after year.Here is the green grass, still wet after the rain.All this he saw, maybe for the last time.Ahead of him lay an unfriendly planet.Where every drop of water was worth its weight in gold, and the natives trusted no one.

The output of the node execution is JSON:

  • with labels, e.g., "NEGATIVE" a grade that reflects a negative mood;
  • with scores, e.g., 0.9562734961509705 the probability or confidence of the model that the given text is negatively colored. The higher the grade, the higher the model's confidence in the processing result.
  • with the action execution status "success": true.
JSON
{
"result": {
"errors": [],
"messages": [],
"result": [
{
"label": "NEGATIVE",
"score": 0.9562734961509705
},
{
"label": "POSITIVE",
"score": 0.043726541101932526
}
],
"success": true
}
}