File size: 827 Bytes
d347764
c4ea1c4
 
 
 
 
 
971d574
 
 
 
 
 
ce79110
c4ea1c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()