Dhahlan2000 commited on
Commit
49f68da
·
verified ·
1 Parent(s): e5a338e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ from PIL import Image
7
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
8
 
9
  # Load pre-trained ViT model from Hugging Face
10
- model = ViTForImageClassification.from_pretrained('Dhahlan2000/banana_ripeness_level_detection', num_labels=20)
11
  model.to(device)
12
  model.eval()
13
 
 
7
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
8
 
9
  # Load pre-trained ViT model from Hugging Face
10
+ model = ViTForImageClassification.from_pretrained('Dhahlan2000/banana_ripeness_level_detection', num_labels=20, ignore_mismatched_sizes=True)
11
  model.to(device)
12
  model.eval()
13