Skip to content

Commit ae0942d

Browse files
committed
v1.1 readme
1 parent 3fdbd93 commit ae0942d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ We trained a python model to classify whether or not a review is real or spam. N
44

55
The model is stored in model as ```model.pkl```.
66

7+
# Version 1.1 - Flask + gunicorn
8+
9+
We can run flask using gunicorn and scale the number of workers.
10+
11+
```bash
12+
gunicorn -w 3 -b :5000 api:app
13+
```
14+
15+
## Benchmarks
16+
```bash
17+
ab -n 10 -p data.json -T application/json 127.0.0.1:5000/predict
18+
```
19+
~2.75 requests/s
20+
721
# Version 1 - Flask
822

923
We can set up a flask server to serve the model.
@@ -26,9 +40,7 @@ How many predictions can our setup handle?
2640
Using Apache Bench:
2741

2842
```bash
29-
ab -n 10 -p data.json \
30-
-T application/json \
31-
127.0.0.1:5000/predict
43+
ab -n 10 -p data.json -T application/json 127.0.0.1:5000/predict
3244
```
3345

3446
```

0 commit comments

Comments
 (0)