|
import gradio as gr |
|
from transformers import pipeline |
|
|
|
pipe = pipeline(task="image-classification", |
|
model="thuyentruong/food_classification_model") |
|
gr.Interface.from_pipeline(pipe, |
|
title="Food Image Classification", |
|
description=""" |
|
Upload a food photo or double-click on the example photos below to see the classification in action. |
|
<br> Powered by a fine tuned Vision Transformer. |
|
<br> Base model: vit-base-patch16-224-in21k from Google. |
|
<br> Fine tune model: food_classification_model by Thuyen Truong. |
|
""", |
|
examples = ['beignets.jpeg','spagetti.jpeg'], |
|
).launch() |