SeyedAli commited on
Commit
cd254a4
1 Parent(s): 648d74a

Update app.txt

Browse files
Files changed (1) hide show
  1. app.txt +14 -1
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)