Spaces:
Runtime error
Runtime error
import streamlit as st | |
from transformers import ImageClassificationPipeline, PerceiverForImageClassificationConvProcessing, PerceiverFeatureExtractor | |
import torch | |
feature_extractor = PerceiverFeatureExtractor.from_pretrained("deepmind/vision-perceiver-conv") | |
model = PerceiverForImageClassificationConvProcessing.from_pretrained("deepmind/vision-perceiver-conv") | |
image_pipe = ImageClassificationPipeline(model=model, feature_extractor=feature_extractor) | |
image = st.file_uploader(type=['jpg','png']) | |
results = image_pipe(image) | |
st.write(results) |