Spaces:
Runtime error
Runtime error
File size: 440 Bytes
1d89df1 797b918 9756209 |
1 2 3 4 5 6 7 |
import streamlit as st
from transformers import pipeline
vision_classifier = pipeline(task="image-classification")
result = vision_classifier(images="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/pipeline-cat-chonk.jpeg")
print("\n".join([f"Class {d['label']} with score {round(d['score'], 4)}" for d in result]))
st.text("\n".join([f"Class {d['label']} with score {round(d['score'], 4)}" for d in result])) |