Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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")
|