import streamlit as st | |
from PIL import Image, ImageOps | |
from transformers import pipeline | |
st.set_page_config( | |
page_title="Big Cat Classifier", | |
layout="centered", | |
initial_sidebar_state="collapsed", | |
) | |
banner_img = Image.open("banner_img.png") | |
st.image(banner_img) | |
pipe = pipeline("image-classification", model="skyau/dog-breed-classifier-vit") | |
img = st.file_uploader("image") | |
if img: | |
img = Image.open(img) | |
label = pipe(img) | |
st.success(str(label)) | |