Skip to content

Commit 44c2b52

Browse files
committed
📝 updated readme for more clarity
1 parent ddfaff6 commit 44c2b52

File tree

3 files changed

+42
-3
lines changed

3 files changed

+42
-3
lines changed

README.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
1-
# FastAPI Model Serving Scaffolding
1+
# FastAPI Model Server Scaffolding
22

3-
Scaffolding for serving ml model APIs using FastAPI
3+
Serving machine learning models production-ready, fast, easy and secure powered by the great FastAPI by [Sebastián Ramírez]([)](https://github.com/tiangolo).
44

5-
This repo contains the scaffolding which can be used to speed up your next machine learning project.
5+
This repository contains a starter app which can be used to speed-up your next machine learning project.
6+
7+
To experiment and get a feeling on how to use this scaffolding, a sample regression model for house price prediction is included in this project. Follow the installation and setup instructions to run the sample model and serve it aso RESTful API.
8+
9+
## Requirements
10+
11+
Python 3.6+
12+
13+
## Installation
14+
Install the required packages in your local environment (ideally virtualenv, conda, etc.).
15+
```bash
16+
pip install -r requirements
17+
```
18+
19+
20+
## Setup
21+
1. Duplicate the `.env.example` file and rename it to `.env`
22+
23+
24+
2. In the `.env` file configure the `API_KEY` entry. The key is used for authenticating our API. <br>
25+
A sample API key can be generated using Python REPL:
26+
```python
27+
import uuid
28+
print(str(uuid.uuid4()))
29+
```
30+
31+
## Run It
32+
33+
1. Start your app with:
34+
```bash
35+
uvicorn fastapi_skeleton.main:app
36+
```
37+
38+
2. Go to [http://localhost:8000/docs](http://localhost:8000/docs).
39+
40+
3. Click `Authorize` and enter the API key as created in the Setup step.
41+
![Authroization](./docs/authorize.png)
42+
43+
4. You can use the sample payload from the `docs/sample_payload.json` file when trying out the house price prediction model using the API.
44+
![Prediction with example payload](./docs/sample_payload.png)

docs/authorize.png

250 KB
Loading

docs/sample_payload.png

441 KB
Loading

0 commit comments

Comments
 (0)