DemahAlmutairi's picture
Update README.md
c20854e verified

A newer version of the Gradio SDK is available: 5.27.1

Upgrade
metadata
title: Project1_Sentiment_Analysis_EN_AR
emoji: 💻
colorFrom: indigo
colorTo: pink
sdk: gradio
sdk_version: 5.17.1
app_file: app.py
pinned: false

Check out the configuration reference at https://huggingface.co./docs/hub/spaces-config-reference

Sentiment Analysis Application

Project Objectives

The objective of this project is to create an application that performs sentiment analysis on text in both English and Arabic. The application allows users to input text and receive feedback on the sentiment conveyed, helping to understand the emotional tone behind the words.

Implemented Pipelines

The application utilizes two sentiment analysis pipelines from the Hugging Face Transformers library:

  1. English Sentiment Analysis Model:

    • Model: nlptown/bert-base-multilingual-uncased-sentiment
    • Description: This model is a multilingual BERT variant fine-tuned for sentiment analysis. It classifies text into multiple sentiment categories, allowing for nuanced understanding.
  2. Arabic Sentiment Analysis Model:

    • Model: CAMeL-Lab/bert-base-arabic-camelbert-da-sentiment
    • Description: This model is specifically designed for Arabic sentiment analysis and leverages the CAMeL BERT architecture. It provides accurate sentiment classification for Arabic text, addressing the unique linguistic features of the language.

Instructions for Using the Interface

To use the application, follow these steps:

  1. Input Text:

    • Enter the text you want to analyze in the provided textbox.
    • Select the language of the text using the radio buttons (English or Arabic).
  2. View Results:

    • Click the "Submit" button to analyze the sentiment.
    • The application will display the sentiment label (e.g., Positive, Negative) and a confidence score.

Justifications for Model and Pipeline Choices

  • Model Choice: The chosen models are state-of-the-art in their respective languages. The multilingual BERT model is widely used for sentiment analysis tasks due to its robustness across different contexts. The CAMeL BERT model is tailored for Arabic and is known for its accuracy in handling the nuances of the language.
  • Pipeline Implementation: The Hugging Face Transformers library provides easy access to these models and allows for quick integration into the Gradio interface, making it a suitable choice for this project.

Bilingual Implementation

The application effectively handles both English and Arabic through the use of two dedicated sentiment analysis pipelines.