ariG23498's picture
ariG23498 HF staff
Create app.py
599cf8a verified
raw
history blame
324 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline(
"image-classification",
model="ariG23498/vit_base_patch16_224.orig_in21k_ft_in1k.ft_food101"
)
def classify(image):
return pipe(image)[0]["label"]
demo = gr.Interface(fn=classify, inputs=gr.Image(type="pil"), outputs="text")
demo.launch()