File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
docs/source/user_guide/model_registration/frameworks Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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")
You can’t perform that action at this time.
0 commit comments