Skip to content

Commit d363bcd

Browse files
committed
update test curl method
1 parent 8b8a5d4 commit d363bcd

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

docs/lab/05-test.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ This tells you: the model expects a `float32` tensor of shape `[batch, 1, 28, 28
6868

6969
## 3. Send a test inference request
7070

71-
Create a file called `payload.json`. Here's a minimal example — a vertical line that the model should recognize as the digit **1**:
71+
Send a test request with a simple vertical line image (which should be recognized as digit **1**):
7272

73-
```json
73+
```bash
74+
curl -sk -X POST "$MODEL_URL/v2/models/mnist-onnx/infer" \
75+
-H "Content-Type: application/json" \
76+
-d @- <<'EOF'
7477
{
7578
"inputs": [{
7679
"name": "input",
@@ -106,14 +109,7 @@ Create a file called `payload.json`. Here's a minimal example — a vertical lin
106109
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
107110
}]
108111
}
109-
```
110-
111-
Send the request:
112-
113-
```bash
114-
curl -sk -X POST "$MODEL_URL/v2/models/mnist-onnx/infer" \
115-
-H "Content-Type: application/json" \
116-
-d @payload.json
112+
EOF
117113
```
118114

119115
## 4. Interpret the response

0 commit comments

Comments
 (0)