doom / app.py
AP4556's picture
Update app.py
46ed02d verified
raw
history blame contribute delete
No virus
644 Bytes
import streamlit as st
from PIL import Image
import requests
from transformers import pipeline
# Load the pipeline
model_name = "AP4556/Do-Model" #AP4556/Do-Model #vm24bho/net_dfm_myimg
pipe = pipeline('image-classification', model=model_name)
st.title("Deepfake vs Real Image Detection")
uploaded_file = st.file_uploader("Choose an image...", type="jpg")
if uploaded_file is not None:
image = Image.open(uploaded_file)
st.image(image, caption='Uploaded Image.', use_column_width=True)
st.write("")
st.write("Classifying...")
# Apply the model
result = pipe(image)
# Display the result
st.write(result)