Remove unnecessary int cast in example code
Browse files
README.md
CHANGED
@@ -83,7 +83,7 @@ images = mnist_dataset["image"]
|
|
83 |
labels = mnist_dataset["label"]
|
84 |
|
85 |
classifier = pipeline("image-classification", model=repo_id)
|
86 |
-
predictions = [
|
87 |
|
88 |
print(f"Labels: {labels}")
|
89 |
print(f"Predictions: {predictions}")
|
|
|
83 |
labels = mnist_dataset["label"]
|
84 |
|
85 |
classifier = pipeline("image-classification", model=repo_id)
|
86 |
+
predictions = [pred[0]["label"] for pred in classifier(images)]
|
87 |
|
88 |
print(f"Labels: {labels}")
|
89 |
print(f"Predictions: {predictions}")
|