Skip to content

Commit 05506e0

Browse files
committed
fix the doc
1 parent cfbdbc2 commit 05506e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/user_guide/model_registration/frameworks/huggingfacemodel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Run Prediction against Endpoint
118118
119119
>>> # Generate prediction by invoking the deployed endpoint
120120
>>> preds = huggingface_pipeline_model.predict(image)["prediction"]
121-
>>> print([{"score": round(pred["score"], 4), "label": pred["label"]} for pred in preds['prediction']])
121+
>>> print([{"score": round(pred["score"], 4), "label": pred["label"]} for pred in preds])
122122
[{'score': 0.9879, 'label': 'LABEL_184'},
123123
{'score': 0.9973, 'label': 'snow'},
124124
{'score': 0.9972, 'label': 'cat'}]
@@ -196,7 +196,7 @@ Example
196196
197197
## download the image
198198
image_url = "https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png"
199-
image = PIL.Image.open(requests.get(image_link, stream=True).raw)
199+
image = PIL.Image.open(requests.get(image_url, stream=True).raw)
200200
201201
## download the pretrained model
202202
classifier = pipeline(model="openai/clip-vit-large-patch14")

0 commit comments

Comments
 (0)