File size: 1,848 Bytes
8c68bc5
 
 
 
 
 
 
 
5224131
8c68bc5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
license: mit
title: Social Aegis
sdk: gradio
emoji: 
colorFrom: blue
colorTo: yellow
pinned: true
sdk_version: 5.44.1
---
# SocialAegis MVP

🛡️ A sentiment-based escalation engine to detect emotional volatility in social media posts.

---

## Overview

SocialAegis is designed to analyze text from social media and other sources to detect sentiment, calculate a risk score, and determine whether escalation is needed. This helps organizations monitor emotional volatility in communications and take timely action.

---

## Features

- **Sentiment Analysis** – Classifies input text as Positive, Neutral, or Negative.  
- **Risk Scoring** – Provides a numerical score indicating the emotional intensity or risk level.  
- **Escalation Trigger** – Indicates whether the text requires escalation based on the risk score.  
- **Supports All Text Inputs** – Works with short posts, long messages, and multiple languages.  

---

## How to Use

1. Enter your text into the input box.  
2. Click **Submit** or **Run**.  
3. The app will return:  
   - **Sentiment** (Positive / Neutral / Negative)  
   - **Risk Score** (rounded to 2 decimal places)  
   - **Escalation Trigger** (Yes / No)  

### Example Inputs

- `"I am so frustrated with this service!"`  
- `"I had an amazing experience, thank you!"`  
- `"This is unacceptable, I will report this."`  

---

## Dependencies

The app requires the following Python packages (all included in `requirements.txt`):

- `gradio`
- `transformers`
- `torch`
- `scipy`
- `sentencepiece`
- `protobuf`
- `langdetect`

---

## Notes

- The model runs entirely in Hugging Face Spaces. No additional setup is required if you use the provided `requirements.txt`.  
- For best results, enter text in a single language at a time.  

---

## Credits

Developed by Karthik Vinay for SocialAegis MVP.