Skip to content

integrate RoBERTa model as the new default#30

Open
SarahZahran1 wants to merge 3 commits intoruxailab:mainfrom
SarahZahran1:main
Open

integrate RoBERTa model as the new default#30
SarahZahran1 wants to merge 3 commits intoruxailab:mainfrom
SarahZahran1:main

Conversation

@SarahZahran1
Copy link
Copy Markdown

Description

This PR adds RoBERTa (cardiffnlp/twitter-roberta-base-sentiment-latest) as a new sentiment analysis model alongside the existing BERTweet model, and sets it as the default model.

Changes

  • Added app/models/roberta_model.py with the RoBERTaSentiment class
  • Updated app/data/sentiment_data.py to support both BERTweet and RoBERTa models
  • Updated config.yaml to add RoBERTa configuration and set it as the default model
  • Updated README.md to reflect the new model in the folder structure

Motivation

This PR introduces cardiffnlp/twitter-roberta-base-sentiment-latest as the default sentiment analysis model. Testing demonstrates that this RoBERTa-based model provides significantly more accurate results and better nuance in sentiment detection compared to the previous BERTweet implementation, especially for modern social media text and edge cases.

How to switch between models

In config.yaml:

sentiment_analysis:
  default_model: "roberta"  # or "bertweet"

Update folder structure in README to include RoBERTa model
Copy link
Copy Markdown
Collaborator

@BasmaElhoseny01 BasmaElhoseny01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM i Have Checked it but will test and then we can merge :D

Great work sara

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert the change here

Copy link
Copy Markdown
Author

@SarahZahran1 SarahZahran1 Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants