Spaces:
Sleeping
Sleeping
readme
Browse files
README.md
CHANGED
@@ -1,14 +1,38 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Text Sentiment Analysis
|
2 |
+
|
3 |
+
A simple web application that analyzes text sentiment using TextBlob and Gradio.
|
4 |
+
|
5 |
+
## Features
|
6 |
+
|
7 |
+
- Real-time sentiment analysis
|
8 |
+
- Returns polarity score (-1 to 1)
|
9 |
+
- Returns subjectivity score (0 to 1)
|
10 |
+
- Provides sentiment assessment (positive/negative/neutral)
|
11 |
+
|
12 |
+
## Installation
|
13 |
+
|
14 |
+
```bash
|
15 |
+
pip install "gradio[mcp]" textblob
|
16 |
+
```
|
17 |
+
|
18 |
+
## Usage
|
19 |
+
|
20 |
+
```bash
|
21 |
+
python app.py
|
22 |
+
```
|
23 |
+
|
24 |
+
The app will launch in your browser with a simple interface where you can enter text and get sentiment analysis results in JSON format.
|
25 |
+
|
26 |
+
## Output Format
|
27 |
+
|
28 |
+
```json
|
29 |
+
{
|
30 |
+
"polarity": 0.5,
|
31 |
+
"subjectivity": 0.6,
|
32 |
+
"assessment": "positive"
|
33 |
+
}
|
34 |
+
```
|
35 |
+
|
36 |
+
- **Polarity**: -1 (most negative) to 1 (most positive)
|
37 |
+
- **Subjectivity**: 0 (objective) to 1 (subjective)
|
38 |
+
- **Assessment**: Overall sentiment classification
|