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
118
118
119
119
>>> # Generate prediction by invoking the deployed endpoint
120
120
>>> 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])
122
122
[{'score': 0.9879, 'label': 'LABEL_184'},
123
123
{'score': 0.9973, 'label': 'snow'},
124
124
{'score': 0.9972, 'label': 'cat'}]
@@ -196,7 +196,7 @@ Example
196
196
197
197
## download the image
198
198
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)
200
200
201
201
## download the pretrained model
202
202
classifier = pipeline(model="openai/clip-vit-large-patch14")
You can’t perform that action at this time.
0 commit comments