pmbrito commited on
Commit
797b918
1 Parent(s): 792587b
Files changed (1) hide show
  1. app.py +5 -0
app.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+ vision_classifier = pipeline(task="image-classification")
4
+ result = vision_classifier(images="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/pipeline-cat-chonk.jpeg")
5
+ print("\n".join([f"Class {d['label']} with score {round(d['score'], 4)}" for d in result]))