Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
pipe = pipeline(task="image-classification",
|
| 5 |
+
model="ewanlong/food_type_image_detection")
|
| 6 |
+
|
| 7 |
+
gr.Interface.from_pipeline(pipe,
|
| 8 |
+
title="Food Recognition",
|
| 9 |
+
description="Food Categories Recognition",
|
| 10 |
+
examples=['apple_pie.jpg', 'dhokla.jpg'],
|
| 11 |
+
article = "Author: <a href=\"https://huggingface.co/ewanlong\">Ewan Long</a>",
|
| 12 |
+
).launch()
|