Skip to content

Commit 1266879

Browse files
authored
Update README.md
1 parent 2f9b35c commit 1266879

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22

33
Deploy a pre-trained BERT model for Sentiment Analysis as a REST API using FastAPI
44

5+
## Demo
6+
7+
The model is trained to classify sentiment (negative, neutral, and positive) on a custom dataset from app reviews on Google Play. Here's a sample request to the API:
8+
9+
```bash
10+
http POST http://127.0.0.1:8000/predict text="Good basic lists, i would like to create more lists, but the annual fee for unlimited lists is too out there"
11+
```
12+
13+
The response you'll get looks something like this:
14+
15+
```js
16+
{
17+
"confidence": 0.9999083280563354,
18+
"probabilities": {
19+
"negative": 3.563107020454481e-05,
20+
"neutral": 0.9999083280563354,
21+
"positive": 5.596495248028077e-05
22+
},
23+
"sentiment": "neutral"
24+
}
25+
```
26+
27+
You can also [read the complete tutorial here](https://www.curiousily.com/posts/deploy-bert-for-sentiment-analysis-as-rest-api-using-pytorch-transformers-by-hugging-face-and-fastapi/)
28+
529
## Installation
630

731
Clone this repo:
@@ -39,4 +63,4 @@ bin/test_request
3963

4064
## License
4165

42-
MIT
66+
MIT

0 commit comments

Comments
 (0)