File size: 393 Bytes
7820b0f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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)
) |