Skip to content

Commit 790ca9d

Browse files
committedMay 13, 2021
docs: ✏️ update example
1 parent 9ab57ce commit 790ca9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Example matrix:
1717

1818
```json
1919
{
20-
"lambda": ["nodejs10.x", "nodejs12.x"],
20+
"lambda": ["nodejs10.x", "nodejs12.x", "nodejs14.x"],
2121
"tensorflow": ["1.7.4", "2.8.5", "3.0.0"]
2222
}
2323
```
@@ -67,14 +67,14 @@ The [`tfjs-node-lambda-helpers`](https://www.npmjs.com/package/tfjs-node-lambda-
6767
In development, `loadTf` will run your locally installed version of `@tensorflow/tfjs-node`. If running in an AWS Lambda environment, `loadTf` expects a readStream of the release:
6868

6969
```ts
70-
import fs from 'fs';
70+
import { Readable } from 'stream';
7171

7272
const response = await axios.get(
7373
'https://github.com/jlarmstrongiv/tfjs-node-lambda/releases/download/v1.5.0/nodejs12.x-tf2.7.0.br',
7474
{ responseType: 'arraybuffer' },
7575
);
7676

77-
const readStream = fs.createReadStream(response.data);
77+
const readStream = Readable.from(response.data);
7878
```
7979

8080
Or, if you have saved the file to the tmp directory:

0 commit comments

Comments
 (0)
Please sign in to comment.