botaniscan / app /models /getModel.py
anurag629's picture
included the models directory
aefc8ad
raw
history blame contribute delete
241 Bytes
from transformers import pipeline
pipe = pipeline("image-classification", "anurag629/swin-tiny-patch4-window7-224-finetuned-eurosat")
def getPrediction(image):
'''
Returns the prediction of the image.
'''
return pipe(image)