Sentiment analysis service
In this part of the tutorial you learn about the sentiment analysis service.
This service uses the Hugging Face model to calculate sentiment for messages, and these are then displayed on the web UI.
There are three deployed services here:
- Chat sentiment analysis
- Drafts sentiment analysis
- Twitch sentiment analysis
💡 Key ideas
The key ideas on this page:
- Hugging Face model is used to generate sentiment values
- How to examine message formats
What it does
The sentiment analysis service uses a prebuilt model from Hugging Face to analyze the sentiment of each message flowing through the service.
Draft messages are messages while the user is typing them, before they are sent. These are used to generate sentiment while the user is typing.
Both the messages and draft messages are generated by the web UI.
The sentiment analysis service subscribes to the
chat-messages topic and performs sentiment analysis using the Hugging Face model, publishing a sentiment value to the
The drafts sentiment analysis service performs sentiment analysis on messages published to the
drafts topic and publishes sentiment values to the
The UI subscribes to these topics, and can then display the sentiment values in the UI.
👩🔬 Lab - Examine messages
There are several ways to view live data. This lab shows one way to do it.
Topicsin the main left-hand navigation.
Where you see live data for the
chat-messagestopic, click in that area, as shown in the screenshot:
You are taken to the live view of the Quix Data Explorer.
chat-messagestopic is preselected for you. The stream names are the user names that you entered, or are user names from the Twitch service. Select any one and then select the
Messagesview, and then click on any real-time message displayed. In the message code view you see something similar to the following: