This model, developed by Sam Lowe, is a fine-tuned version of RoBERTa for multi-label emotion classification, released in 2020. It is designed to identify 28 different emotions in text.
The Emotions Analysis API endpoint allows you to extract the different emotions from text.
Emotions Analysis task refers to the process of automatically identifying and extracting emotional information from text. Emotion extraction typically involves analyzing language patterns, sentence structure, and other linguistic features to infer the emotional state of the person who wrote.
AI Endpoints makes it easy, with ready-to-use inference APIs. Discover how to use them:
This Emotions Analysis API is based on an Open-Source model: SamLowe/roberta-base-go_emotions. It takes text as input and returns the text's emotions and the corresponding probability.
Model configuration:
The Emotion Analysis endpoint offers you an optimized way to extract the different emotions of a text. Learn how to use them with the following example:
First install the requests library:
pip install requests
Next, export your access token to the OVH_AI_ENDPOINTS_ACCESS_TOKEN environment variable:
export OVH_AI_ENDPOINTS_ACCESS_TOKEN=<your-access-token>
If you do not have an access token key yet, follow the instructions in the AI Endpoints – Getting Started.
Finally, run the following Python code:
import os
import requests
url = "https://roberta-base-go-emotions.endpoints.kepler.ai.cloud.ovh.net/api/text2emotions"
text = "I'm very happy and this sentence should be converted into a 'joy' emotion."
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('OVH_AI_ENDPOINTS_ACCESS_TOKEN')}",
}
response = requests.post(url, data=text, headers=headers)
if response.status_code == 200:
# Handle response
response_data = response.json()
print(response_data)
else:
print("Error:", response.status_code, response.text)
When using AI Endpoints, the following rate limits apply:
If you exceed this limit, a 429 error code will be returned.
If you require higher usage, please get in touch with us to discuss increasing your rate limits.
For a broader overview of AI Endpoints, explore the full AI Endpoints Documentation.
Reach out to our support team or join the OVHcloud Discord #ai-endpoints channel to share your questions, feedback, and suggestions for improving the service, to the team and the community.
New to AI Endpoints? This guide walks you through everything you need to get an access token, call AI models, and integrate AI APIs into your apps with ease.
Start TutorialExplore what AI Endpoints can do. This guide breaks down current features, future roadmap items, and the platform's core capabilities so you know exactly what to expect.
Start TutorialRunning into issues? This guide helps you solve common problems on AI Endpoints, from error codes to unexpected responses. Get quick answers, clear fixes, and helpful tips to keep your projects running smoothly.
Start TutorialLearn how to use Structured Output with OVHcloud AI Endpoints.
Start TutorialLearn how to use Function Calling with OVHcloud AI Endpoints.
Start TutorialLearn how to use OVHcloud AI Endpoints Virtual Models.
Start TutorialUnlock emotional insights from text using AI! This tutorial shows you how to build a Java-based sentiment analyzer with Quarkus and the powerful GoEmotions model.
Start TutorialLearn how to use Structured Output with Java, LangChain4j and OVHcloud AI Endpoints.
Start TutorialLearn how to use Function Calling with Java, LangChain4j and OVHcloud AI Endpoints.
Start TutorialLearn how to use Model Context Protocol (MCP) with Java, LangChain4j and OVHcloud AI Endpoints.
Start Tutorial