Update app.py
Browse files
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 |
|