Mohammadreza Ghaffarzadeh commited on
Commit
9a14f01
·
1 Parent(s): 132e68e

I think its done

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ processor = AutoImageProcessor.from_pretrained("Moreza009/HF_CVcourse_FoodClassi
9
  model = AutoModelForImageClassification.from_pretrained("Moreza009/HF_CVcourse_FoodClassifier")
10
 
11
  def classifier(image):
12
- image = Image.open(image.raw)
13
  inputs = processor(images=image, return_tensors="pt")
14
  outputs = model(**inputs)
15
  logits = outputs.logits
 
9
  model = AutoModelForImageClassification.from_pretrained("Moreza009/HF_CVcourse_FoodClassifier")
10
 
11
  def classifier(image):
12
+ image = Image.open(image)
13
  inputs = processor(images=image, return_tensors="pt")
14
  outputs = model(**inputs)
15
  logits = outputs.logits