Spaces:
Sleeping
Sleeping
File size: 1,168 Bytes
dbb74a5 c8be292 | 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 | ---
title: AI Deal Sentiment API
colorFrom: gray
colorTo: purple
sdk: docker
pinned: false
---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
=======
colorFrom: gray
colorTo: blue
sdk: docker
pinned: false
short_description: Sentiment API with a simple web UI
---
# AI Deal Sentiment API
A FastAPI service that analyzes customer chat/email sentiment and returns a label, score, and brief reason. Includes a simple web UI.
## Features
- `/sentiment` API for positive/neutral/negative detection
- `/health` for readiness checks
- Simple web UI at `/`
## Run (Local)
```bash
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 7860
```
## Run (Docker)
```bash
docker build -t ai-deal-sentiment-api .
docker run -p 7860:7860 ai-deal-sentiment-api
```
## API
### POST `/sentiment`
```json
{
"text": "Customer message here"
}
```
Response:
```json
{
"label": "positive",
"score": 0.82,
"brief_reason": "Customer intent to buy detected"
}
```
### GET `/health`
Returns:
```json
{ "status": "ok" }
```
>>>>>>> ff9fb03 ([ADD]Initial Commit)
|