SeyedAli commited on
Commit
0c0cd61
·
1 Parent(s): 5bf9ffd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ model = ViTFeatureExtractor.from_pretrained('SeyedAli/Food-Image-Classification-
6
 
7
  def FoodClassification(image):
8
  pipline = pipeline(task="image-classification", model=model)
9
- output=pipline(image)
10
  return output
11
 
12
  iface = gr.Interface(fn=FoodClassification, inputs="image", outputs="text")
 
6
 
7
  def FoodClassification(image):
8
  pipline = pipeline(task="image-classification", model=model)
9
+ output=pipline(model(image, return_tensors='pt'))
10
  return output
11
 
12
  iface = gr.Interface(fn=FoodClassification, inputs="image", outputs="text")