Update README.md
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: 💻
|
4 |
colorFrom: indigo
|
5 |
colorTo: pink
|
@@ -10,3 +10,51 @@ pinned: false
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
title: Project1_Sentiment_Analysis_EN_AR
|
3 |
emoji: 💻
|
4 |
colorFrom: indigo
|
5 |
colorTo: pink
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
13 |
+
|
14 |
+
# Sentiment Analysis Application
|
15 |
+
|
16 |
+
## Project Objectives
|
17 |
+
The objective of this project is to create a web-based 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.
|
18 |
+
|
19 |
+
## Implemented Pipelines
|
20 |
+
The application utilizes two sentiment analysis pipelines from the Hugging Face Transformers library:
|
21 |
+
|
22 |
+
1. **English Sentiment Analysis Model**:
|
23 |
+
- **Model**: `nlptown/bert-base-multilingual-uncased-sentiment`
|
24 |
+
- **Description**: This model is a multilingual BERT variant fine-tuned for sentiment analysis. It classifies text into multiple sentiment categories, allowing for nuanced understanding.
|
25 |
+
|
26 |
+
2. **Arabic Sentiment Analysis Model**:
|
27 |
+
- **Model**: `CAMeL-Lab/bert-base-arabic-camelbert-da-sentiment`
|
28 |
+
- **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.
|
29 |
+
|
30 |
+
## Instructions for Using the Interface
|
31 |
+
To use the application, follow these steps:
|
32 |
+
|
33 |
+
1. **Run the Application**:
|
34 |
+
- Ensure you have Python and the required libraries installed. You can install the necessary libraries using:
|
35 |
+
```bash
|
36 |
+
pip install gradio transformers
|
37 |
+
```
|
38 |
+
- Run the application by executing:
|
39 |
+
```bash
|
40 |
+
python sentiment_analysis.py
|
41 |
+
```
|
42 |
+
- This will launch a web interface in your default browser.
|
43 |
+
|
44 |
+
2. **Input Text**:
|
45 |
+
- Enter the text you want to analyze in the provided textbox.
|
46 |
+
- Select the language of the text using the radio buttons (English or Arabic).
|
47 |
+
|
48 |
+
3. **View Results**:
|
49 |
+
- Click the "Submit" button to analyze the sentiment.
|
50 |
+
- The application will display the sentiment label (e.g., Positive, Negative) and a confidence score.
|
51 |
+
|
52 |
+
4. **Use Examples**:
|
53 |
+
- You can also click on the provided examples to quickly test the sentiment analysis feature.
|
54 |
+
|
55 |
+
## Justifications for Model and Pipeline Choices
|
56 |
+
- **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.
|
57 |
+
- **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.
|
58 |
+
|
59 |
+
## Bilingual Implementation
|
60 |
+
The application effectively handles both English and Arabic through the use of two dedicated sentiment analysis pipelines. Each model is optimized for its respective language, ensuring that users receive accurate sentiment classifications regardless of the input language. The interface allows users to select their preferred language, making the application user-friendly and accessible to a broader audience.
|