Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
3 |
import torch
|
4 |
-
from transformers import
|
5 |
|
6 |
-
model =
|
7 |
|
8 |
def FoodClassification(image):
|
9 |
pipline = pipeline(task="image-classification", model=model)
|
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
3 |
import torch
|
4 |
+
from transformers import ViTImageProcessor,pipeline
|
5 |
|
6 |
+
model = ViTImageProcessor.from_pretrained('SeyedAli/Food-Image-Classification-VIT')
|
7 |
|
8 |
def FoodClassification(image):
|
9 |
pipline = pipeline(task="image-classification", model=model)
|