D0k-tor commited on
Commit
751acdb
·
1 Parent(s): 2baef79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -34,7 +34,7 @@ feature_extractor = ViTFeatureExtractor.from_pretrained(model_id)
34
 
35
  # Predict function
36
  def predict(image):
37
- img = Image.open(image).convert('RGB')
38
  model.eval()
39
  pixel_values = feature_extractor(images=[img], return_tensors="pt").pixel_values
40
  with torch.no_grad():
 
34
 
35
  # Predict function
36
  def predict(image):
37
+ img = image.convert('RGB')
38
  model.eval()
39
  pixel_values = feature_extractor(images=[img], return_tensors="pt").pixel_values
40
  with torch.no_grad():