Skip to content

Commit 7b68647

Browse files
Merge pull request #217620 from santiagxf/santiagxf/azureml-patch-python
Update how-to-image-processing-batch.md
2 parents 3aea1d0 + 4d925b3 commit 7b68647

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/machine-learning/batch-inference/how-to-image-processing-batch.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ Batch Endpoint can only deploy registered models so we need to register it. You
6666
6767
```python
6868
import os
69-
import requests
69+
import urllib.request
7070
from zipfile import ZipFile
7171
72-
requests.get('https://azuremlexampledata.blob.core.windows.net/data/imagenet/model.zip', allow_redirects=True)
72+
response = urllib.request.urlretrieve('https://azuremlexampledata.blob.core.windows.net/data/imagenet/model.zip', 'model.zip')
7373
7474
os.mkdirs("imagenet-classifier", exits_ok=True)
75-
with ZipFile(file, 'r') as zip:
75+
with ZipFile(response[0], 'r') as zip:
7676
model_path = zip.extractall(path="imagenet-classifier")
7777
```
7878

0 commit comments

Comments
 (0)