Spaces:
Runtime error
Runtime error
| 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])) |