Skip to content

Commit 67c5519

Browse files
committed
Update example for bash
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent b04aae2 commit 67c5519

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ $ faas-cli deploy --image alexellis/inception --name inception --fprocess "pytho
1717

1818
Invoke via `curl` or `faas-cli invoke`:
1919

20-
```
21-
$ URL=https://upload.wikimedia.org/wikipedia/commons/6/61/Humpback_Whale_underwater_shot.jpg \
22-
echo -n $URL | faas-cli invoke inception
20+
```sh
21+
export URL=https://upload.wikimedia.org/wikipedia/commons/6/61/Humpback_Whale_underwater_shot.jpg
22+
echo -n $URL | faas-cli invoke inception
2323

2424
[{"name": "great white shark", "score": 0.5343291759490967}, {"name": "tiger shark", "score": 0.09276486188173294}, {"name": "grey whale", "score": 0.05899052694439888}, {"name": "sea lion", "score": 0.05105864629149437}, {"name": "hammerhead", "score": 0.019910583272576332}, {"name": "sturgeon", "score": 0.013177040033042431}, {"name": "stingray", "score": 0.00763126602396369}, {"name": "electric ray", "score": 0.006749240681529045}, {"name": "killer whale", "score": 0.005086909048259258}, {"name": "ice bear", "score": 0.003828041721135378}]
2525
```
@@ -28,11 +28,12 @@ $ URL=https://upload.wikimedia.org/wikipedia/commons/6/61/Humpback_Whale_underwa
2828
2929
* Use `jq` tool to filter the top matches:
3030

31+
```sh
32+
export URL=https://upload.wikimedia.org/wikipedia/commons/6/61/Humpback_Whale_underwater_shot.jpg
33+
echo -n $URL | faas-cli invoke inception | jq '.[] | select(.score > 0.05)'
3134
```
32-
$ URL=https://upload.wikimedia.org/wikipedia/commons/6/61/Humpback_Whale_underwater_shot.jpg \
33-
echo -n $URL | faas-cli invoke inception \
34-
| jq '.[] | select(.score > 0.05)'
3535

36+
```json
3637
{
3738
"name": "great white shark",
3839
"score": 0.5343291759490967

0 commit comments

Comments
 (0)