Ubuntu
added models
7820b0f
raw
history blame
393 Bytes
from transformers import pipeline
from PIL import Image
import streamlit as st
classifier = pipeline("image-classification", model="research/ai_detector_v2/checkpoint-1815")
with st.sidebar:
image= st.sidebar.file_uploader("Input image:", type=["png", "jpg"])
btn= st.button("Submit")
if btn:
img= original_image= Image.open(image)
st.json(
classifier(img)
)