Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,9 +7,10 @@ from PIL import Image
|
|
| 7 |
labels = ['Leggings', 'Jogger', 'Palazzo', 'Cargo', 'Dresspants', 'Chinos']
|
| 8 |
|
| 9 |
# Load the ViT model and feature extractor
|
| 10 |
-
model = ViTForImageClassification.from_pretrained("DumbledoreWiz/PantsShape")
|
| 11 |
-
feature_extractor = ViTFeatureExtractor.from_pretrained("google/vit-base-patch16-224-in21k")
|
| 12 |
-
|
|
|
|
| 13 |
# Set the model to evaluation mode
|
| 14 |
model.eval()
|
| 15 |
|
|
|
|
| 7 |
labels = ['Leggings', 'Jogger', 'Palazzo', 'Cargo', 'Dresspants', 'Chinos']
|
| 8 |
|
| 9 |
# Load the ViT model and feature extractor
|
| 10 |
+
#model = ViTForImageClassification.from_pretrained("DumbledoreWiz/PantsShape")
|
| 11 |
+
#feature_extractor = ViTFeatureExtractor.from_pretrained("google/vit-base-patch16-224-in21k")
|
| 12 |
+
model = ViTForImageClassification.from_pretrained("DumbledoreWiz/PantsShape", config=config)
|
| 13 |
+
feature_extractor = ViTFeatureExtractor.from_pretrained("DumbledoreWiz/PantsShape")
|
| 14 |
# Set the model to evaluation mode
|
| 15 |
model.eval()
|
| 16 |
|