Spaces:
Sleeping
Sleeping
Add HuggingFace Space metadata to README
Browse files
README.md
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Sentiment Analysis API
|
| 2 |
|
| 3 |
A FastAPI-based sentiment analysis service using ensemble machine learning models (KNN, Random Forest, Extra Trees).
|
| 4 |
|
| 5 |
## Features
|
| 6 |
|
| 7 |
-
- **Fast predictions** using pre-trained ML models
|
| 8 |
- **RESTful API** with automatic documentation
|
| 9 |
- **CORS enabled** for web frontend integration
|
| 10 |
- **Ensemble learning** for improved accuracy
|
|
@@ -37,20 +46,12 @@ Analyzes sentiment of input text
|
|
| 37 |
|
| 38 |
## Models
|
| 39 |
|
| 40 |
-
This API
|
|
|
|
| 41 |
- **Label Encoder**: Encodes sentiment labels
|
| 42 |
-
- **TF-IDF Vectorizer**: Converts text to numerical features
|
| 43 |
- **Voting Classifier**: Ensemble of KNN, Random Forest, and Extra Trees
|
| 44 |
|
| 45 |
-
## Local Development
|
| 46 |
-
|
| 47 |
-
```bash
|
| 48 |
-
pip install -r requirements.txt
|
| 49 |
-
python app.py
|
| 50 |
-
```
|
| 51 |
-
|
| 52 |
-
The API will be available at `http://localhost:7860`
|
| 53 |
-
|
| 54 |
## Documentation
|
| 55 |
|
| 56 |
-
Interactive API documentation available at `/docs` (Swagger UI)
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Sentiment Analysis API
|
| 3 |
+
emoji: 😊
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
# Sentiment Analysis API
|
| 11 |
|
| 12 |
A FastAPI-based sentiment analysis service using ensemble machine learning models (KNN, Random Forest, Extra Trees).
|
| 13 |
|
| 14 |
## Features
|
| 15 |
|
| 16 |
+
- **Fast predictions** using pre-trained ML models from HuggingFace Model Hub
|
| 17 |
- **RESTful API** with automatic documentation
|
| 18 |
- **CORS enabled** for web frontend integration
|
| 19 |
- **Ensemble learning** for improved accuracy
|
|
|
|
| 46 |
|
| 47 |
## Models
|
| 48 |
|
| 49 |
+
This API downloads models from HuggingFace Model Hub: `anis80/anisproject`
|
| 50 |
+
|
| 51 |
- **Label Encoder**: Encodes sentiment labels
|
| 52 |
+
- **TF-IDF Vectorizer**: Converts text to numerical features
|
| 53 |
- **Voting Classifier**: Ensemble of KNN, Random Forest, and Extra Trees
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
## Documentation
|
| 56 |
|
| 57 |
+
Interactive API documentation available at `/docs` (Swagger UI)
|