Skip to content

Commit 2ae8baf

Browse files
authored
Colab links (#486)
1 parent 406c90c commit 2ae8baf

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

examples/image-classifier/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This example shows how to deploy an Image Classifier made with Pytorch. The Pyto
44

55
## Define a deployment
66

7+
A `deployment` specifies a set of resources that are deployed as a single unit. An `api` makes a model available as a web service that can serve real-time predictions. This configuration will download the model from the `cortex-examples` S3 bucket, preprocess the request payload and postprocess the model inference with the functions defined in `alexnet_handler.py`.
8+
79
```yaml
810
- kind: deployment
911
name: image-classifier
@@ -13,8 +15,11 @@ This example shows how to deploy an Image Classifier made with Pytorch. The Pyto
1315
model: s3://cortex-examples/image-classifier/alexnet.onnx
1416
request_handler: alexnet_handler.py
1517
```
18+
<!-- CORTEX_VERSION_MINOR x2 -->
19+
You can run the code that generated the exported models used in this example folder here:
20+
- [Pytorch Alexnet](https://colab.research.google.com/github/cortexlabs/cortex/blob/master/examples/image-classifier/alexnet.ipynb)
21+
- [Tensorflow Inception V3](https://colab.research.google.com/github/cortexlabs/cortex/blob/master/examples/image-classifier/inception.ipynb)
1622
17-
A `deployment` specifies a set of resources that are deployed as a single unit. An `api` makes a model available as a web service that can serve real-time predictions. This configuration will download the model from the `cortex-examples` S3 bucket, preprocess the request payload and postprocess the model inference with the functions defined in `alexnet_handler.py`.
1823
1924
## Add request handling
2025

examples/iris-classifier/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ Define a `deployment` and an `api` resource in `cortex.yaml`. A `deployment` spe
1515
model: s3://cortex-examples/iris-classifier/tensorflow
1616
request_handler: handlers/tensorflow.py
1717
```
18+
<!-- CORTEX_VERSION_MINOR x5 -->
19+
You can run the code that generated the exported models used in this folder example here:
20+
- [Tensorflow](https://colab.research.google.com/github/cortexlabs/cortex/blob/master/examples/iris-classifier/models/tensorflow.ipynb)
21+
- [Pytorch](https://colab.research.google.com/github/cortexlabs/cortex/blob/master/examples/iris-classifier/models/pytorch.ipynb)
22+
- [Keras](https://colab.research.google.com/github/cortexlabs/cortex/blob/master/examples/iris-classifier/models/keras.ipynb)
23+
- [XGBoost](https://colab.research.google.com/github/cortexlabs/cortex/blob/master/examples/iris-classifier/models/xgboost.ipynb)
24+
- [sklearn](https://colab.research.google.com/github/cortexlabs/cortex/blob/master/examples/iris-classifier/models/sklearn.ipynb)
1825
1926
## Add request handling
2027

examples/sentiment-analysis/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This example shows how to deploy a sentiment analysis classifier trained using [
44

55
## Define a deployment
66

7+
A `deployment` specifies a set of resources that are deployed as a single unit. An `api` makes a model available as a web service that can serve real-time predictions. This configuration will download the model from the `cortex-examples` S3 bucket and preprocess the payload and postprocess the inference with functions defined in `sentiment.py`.
8+
79
```yaml
810
- kind: deployment
911
name: sentiment
@@ -13,8 +15,9 @@ This example shows how to deploy a sentiment analysis classifier trained using [
1315
model: s3://cortex-examples/sentiment-analysis/bert
1416
request_handler: sentiment.py
1517
```
18+
<!-- CORTEX_VERSION_MINOR -->
19+
You can run the code that generated the exported BERT model [here](https://colab.research.google.com/github/cortexlabs/cortex/blob/master/examples/sentiment-analysis/bert.ipynb).
1620
17-
A `deployment` specifies a set of resources that are deployed as a single unit. An `api` makes a model available as a web service that can serve real-time predictions. This configuration will download the model from the `cortex-examples` S3 bucket and preprocess the payload and postprocess the inference with functions defined in `sentiment.py`.
1821
1922
## Add request handling
2023

examples/text-generator/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This example shows how to deploy OpenAI's GPT-2 model as a service on AWS.
44

55
## Define a deployment
66

7+
A `deployment` specifies a set of resources that are deployed as a single unit. An `api` makes a model available as a web service that can serve real-time predictions. This configuration will download the 124M GPT-2 model from the `cortex-examples` S3 bucket, preprocess the payload and postprocess the inference with functions defined in `encoder.py` and deploy each replica of the API on 1 GPU.
8+
79
```yaml
810
- kind: deployment
911
name: text
@@ -15,8 +17,8 @@ This example shows how to deploy OpenAI's GPT-2 model as a service on AWS.
1517
compute:
1618
gpu: 1
1719
```
18-
19-
A `deployment` specifies a set of resources that are deployed as a single unit. An `api` makes a model available as a web service that can serve real-time predictions. This configuration will download the 124M GPT-2 model from the `cortex-examples` S3 bucket, preprocess the payload and postprocess the inference with functions defined in `encoder.py` and deploy each replica of the API on 1 GPU.
20+
<!-- CORTEX_VERSION_MINOR -->
21+
You can run the code that generated the exported GPT-2 model [here](https://colab.research.google.com/github/cortexlabs/cortex/blob/master/examples/text-generator/gpt-2.ipynb).
2022
2123
## Add request handling
2224

0 commit comments

Comments
 (0)