https://github.com/marwan2232004/emotionsenseapi
https://github.com/marwan2232004/emotionsenseapi
app-services azure fastapi python3
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/marwan2232004/emotionsenseapi
- Owner: marwan2232004
- Created: 2024-09-04T11:38:52.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-07T21:06:41.000Z (9 months ago)
- Last Synced: 2025-01-08T08:17:09.771Z (5 months ago)
- Topics: app-services, azure, fastapi, python3
- Language: Python
- Homepage: https://emotionsense-dvemggcjagcqdxey.uaenorth-01.azurewebsites.net/
- Size: 98.3 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎉 Welcome to Emotion Sense API!
This API is built using **FastAPI** and is designed to perform **sentiment analysis** on text inputs. Whether it's identifying emotions like positive, negative, or neutral, this API has got you covered!
🌐 **Live Demo**: The API is deployed on **Azure Web Services** and can be accessed at the following link:
[Emotion Sense API](https://emotionsense-dvemggcjagcqdxey.uaenorth-01.azurewebsites.net/)## POST /predict
This endpoint takes in a text input and returns a sentiment prediction. The sentiment is classified as `positive`, `neutral`, or `negative` based on the analysis of the text.
### Request:
- **URL**: `/predict`
- **Method**: `POST`
- **Content-Type**: `application/json`
- **Request Body**:
- The request body should contain a string of text to be analyzed for sentiment.### Response:
- **Content-Type**: `application/json`
- **Body**: A JSON object containing a `prediction` field with an integer value:
- `0` = neutral
- `1` = positive
- `2` = negative#### Example response:
```json
{
"prediction": 1
}