|
import gradio as gr |
|
from transformers import pipeline |
|
|
|
examples = ["examples/example_0.jpg", |
|
"examples/example_1.jpg", |
|
"examples/example_2.2.jpg", |
|
"examples/example_3.jpg", |
|
"examples/example_4.jpg", |
|
"examples/example_5.jpg", |
|
"examples/example_6.jpg", |
|
"examples/example_7.jpg"] |
|
|
|
pipe = pipeline(task="image-classification", |
|
model="Kaludi/food-category-classification") |
|
gr.Interface.from_pipeline(pipe, |
|
title="Food Category Classification App", |
|
description = "This is a Food Category Image Classifier model that has been trained by <strong><a href='https://huggingface.co/Kaludi'>Kaludi</a></strong> to recognize <strong>11</strong> different categories of foods, including <strong>Bread, Dairy Product, Dessert, Egg, Fried Food, Meat, Noodles-Pasta, Rice, Seafood, Soup,</strong> and <strong>Vegetable-Fruit</strong>. It can accurately classify an image of food into one of these categories by analyzing its visual features. This model can be used by food bloggers, restaurants, and recipe websites to quickly categorize and sort their food images, making it easier to manage their content and provide a better user experience.", |
|
article = "<p style='text-align: center'><a href='https://github.com/Kaludii'>Github</a> | <a href='https://huggingface.co/Kaludi'>HuggingFace</a></p>", |
|
examples=examples, |
|
).launch() |