krasserm commited on
Commit
610cfdf
1 Parent(s): 0ea2d66

Remove unnecessary int cast in example code

Browse files
Files changed (1) hide show
  1. README.md +1 -1
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 = [int(pred[0]["label"]) for pred in classifier(images)]
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}")