This is a model finetuned on "google/vit-base-patch16-224-in21k" model for the image classification task to detect if the image is deepfake or not.
Use following commands for inference.
# import libraries
from transformers import pipeline
from PIL import Image

# Create a pipeline for image classification tasks.
model_name = "DhruvJariwala/deepfake_vs_real_image_detection"

# - 'device': Specifies the device to use for running the model (0 for GPU, -1 for CPU).
pipe = pipeline('image-classification', model=model_name, device=0)

#load the image
image_path = "/you_input_path/your_image.jpg" # Replace this with the path to your image
image = Image.open(image_path)

# Apply the 'pipe' function to process the 'image' variable.
pipe(image)
real fake