Spaces:
Runtime error
Runtime error
Update app.txt
Browse files
app.txt
CHANGED
@@ -1 +1,14 @@
|
|
1 |
-
SeyedAli/Food-Image-Classification-VIT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
SeyedAli/Food-Image-Classification-VIT
|
2 |
+
import gradio as gr
|
3 |
+
import torch
|
4 |
+
from transformers import ViTFeatureExtractor,pipeline
|
5 |
+
|
6 |
+
model = ViTFeatureExtractor.from_pretrained(('SeyedAli/Persian-Text-NER-Bert-V1')
|
7 |
+
|
8 |
+
def FoodClassification(image):
|
9 |
+
pipline = pipeline(task="image-classification", model=model)
|
10 |
+
output=pipline(image)
|
11 |
+
return output
|
12 |
+
|
13 |
+
iface = gr.Interface(fn=FoodClassification, inputs="image", outputs="text")
|
14 |
+
iface.launch(share=False)
|