SeyedAli commited on
Commit
05c382a
1 Parent(s): 34a7ce6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,9 +3,9 @@ from PIL import Image
3
  import tempfile
4
  import torch
5
  from torchvision.io import read_image
6
- from transformers import ViTForImageClassification, ViTFeatureExtractor,ViTImageProcessor,pipeline
7
 
8
- # With ViTImageProcessor we can't use pipeline for image classification so Icomment it
9
  # model = ViTImageProcessor.from_pretrained('SeyedAli/Food-Image-Classification-VIT')
10
 
11
  model = ViTForImageClassification.from_pretrained('SeyedAli/Food-Image-Classification-VIT')
 
3
  import tempfile
4
  import torch
5
  from torchvision.io import read_image
6
+ from transformers import ViTForImageClassification, ViTFeatureExtractor,ViTImageProcessor
7
 
8
+ # With ViTImageProcessor we have error so i comment it
9
  # model = ViTImageProcessor.from_pretrained('SeyedAli/Food-Image-Classification-VIT')
10
 
11
  model = ViTForImageClassification.from_pretrained('SeyedAli/Food-Image-Classification-VIT')