Spaces:
Sleeping
Sleeping
Commit
Β·
d345be4
1
Parent(s):
bf03689
Done with readme
Browse files
README.md
CHANGED
|
@@ -1,90 +1,11 @@
|
|
| 1 |
-
# RateMyReview
|
| 2 |
-
|
| 3 |
-
**RateMyReview** is a FastAPI-powered service that uses **zero-shot text classification** to automatically assign ratings (1β5 stars) to customer reviews. Instead of relying on pre-labeled datasets, the system leverages Hugging Faceβs `facebook/bart-large-mnli` model to classify reviews into custom labels such as *worst experience*, *bad experience*, *average experience*, *good experience*, and *excellent experience*.
|
| 4 |
-
|
| 5 |
-
### β¨ Features
|
| 6 |
-
|
| 7 |
-
* π **Zero-Shot Classification** β no manual dataset labeling required
|
| 8 |
-
* π **Text-to-Rating Mapping** β converts review text into a numeric score (1β5)
|
| 9 |
-
* β‘ **FastAPI Backend** β lightweight and production-ready API
|
| 10 |
-
* π³ **Dockerized** β ready to run in any containerized environment
|
| 11 |
-
|
| 12 |
-
### π§ Tech Stack
|
| 13 |
-
|
| 14 |
-
* [FastAPI](https://fastapi.tiangolo.com/) β API framework
|
| 15 |
-
* [Transformers](https://huggingface.co/transformers/) β NLP models
|
| 16 |
-
* [PyTorch](https://pytorch.org/) β deep learning backend
|
| 17 |
-
* [Docker](https://www.docker.com/) β containerization
|
| 18 |
-
|
| 19 |
-
### π Example Usage
|
| 20 |
-
|
| 21 |
---
|
| 22 |
-
title:
|
| 23 |
-
emoji:
|
| 24 |
-
colorFrom:
|
| 25 |
colorTo: blue
|
| 26 |
-
sdk:
|
| 27 |
-
sdk_version: "latest"
|
| 28 |
-
app_file: app.py
|
| 29 |
pinned: false
|
|
|
|
| 30 |
---
|
| 31 |
|
| 32 |
-
|
| 33 |
-
# RateMyReview
|
| 34 |
-
|
| 35 |
-
**RateMyReview** is a FastAPI-powered service that uses **zero-shot text classification** to automatically assign ratings (1β5 stars) to customer reviews. Instead of relying on pre-labeled datasets, the system leverages Hugging Faceβs `facebook/bart-large-mnli` model to classify reviews into custom labels such as *worst experience*, *bad experience*, *average experience*, *good experience*, and *excellent experience*.
|
| 36 |
-
|
| 37 |
-
### β¨ Features
|
| 38 |
-
|
| 39 |
-
* π **Zero-Shot Classification** β no manual dataset labeling required
|
| 40 |
-
* π **Text-to-Rating Mapping** β converts review text into a numeric score (1β5)
|
| 41 |
-
* β‘ **FastAPI Backend** β lightweight and production-ready API
|
| 42 |
-
* π³ **Dockerized** β ready to run in any containerized environment
|
| 43 |
-
|
| 44 |
-
### π§ Tech Stack
|
| 45 |
-
|
| 46 |
-
* [FastAPI](https://fastapi.tiangolo.com/) β API framework
|
| 47 |
-
* [Transformers](https://huggingface.co/transformers/) β NLP models
|
| 48 |
-
* [PyTorch](https://pytorch.org/) β deep learning backend
|
| 49 |
-
* [Docker](https://www.docker.com/) β containerization
|
| 50 |
-
|
| 51 |
-
### π Example Usage
|
| 52 |
-
|
| 53 |
-
```json
|
| 54 |
-
Input:
|
| 55 |
-
"This was the most disappointing purchase I've ever made."
|
| 56 |
-
|
| 57 |
-
Output:
|
| 58 |
-
{
|
| 59 |
-
"score": 1,
|
| 60 |
-
"label": "worst experience"
|
| 61 |
-
}
|
| 62 |
-
```
|
| 63 |
-
|
| 64 |
-
### π Getting Started
|
| 65 |
-
|
| 66 |
-
1. Clone the repo
|
| 67 |
-
|
| 68 |
-
```bash
|
| 69 |
-
git clone https://github.com/<your-username>/RateMyReview.git
|
| 70 |
-
cd RateMyReview
|
| 71 |
-
```
|
| 72 |
-
|
| 73 |
-
2. Build and run with Docker
|
| 74 |
-
|
| 75 |
-
```bash
|
| 76 |
-
docker build -t ratemyreview .
|
| 77 |
-
docker run -p 8000:8000 ratemyreview
|
| 78 |
-
```
|
| 79 |
-
|
| 80 |
-
3. Send a request
|
| 81 |
-
|
| 82 |
-
```bash
|
| 83 |
-
curl -X POST "http://127.0.0.1:8000/" -H "Content-Type: application/json" -d '{"review": "Great product, I loved it!"}'
|
| 84 |
-
```
|
| 85 |
-
|
| 86 |
-
---
|
| 87 |
-
|
| 88 |
-
π‘ This project demonstrates how **zero-shot learning** can be applied to real-world customer feedback analysis without a custom training dataset.
|
| 89 |
-
|
| 90 |
-
````
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: AI_review
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: yellow
|
| 5 |
colorTo: blue
|
| 6 |
+
sdk: docker
|
|
|
|
|
|
|
| 7 |
pinned: false
|
| 8 |
+
short_description: An app that reviews as ratings
|
| 9 |
---
|
| 10 |
|
| 11 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|