Spaces:
Runtime error
Runtime error
Commit
·
0fcdd31
1
Parent(s):
bf4709c
Update image_classification.py
Browse files- image_classification.py +2 -2
image_classification.py
CHANGED
@@ -12,8 +12,8 @@ from PIL import Image
|
|
12 |
#url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
|
13 |
#image = Image.open(requests.get(url, stream=True).raw)
|
14 |
|
15 |
-
processor = ViTImageProcessor.from_pretrained('
|
16 |
-
model = ViTForImageClassification.from_pretrained('
|
17 |
|
18 |
#inputs = processor(images=image, return_tensors="pt")
|
19 |
#outputs = model(**inputs)
|
|
|
12 |
#url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
|
13 |
#image = Image.open(requests.get(url, stream=True).raw)
|
14 |
|
15 |
+
processor = ViTImageProcessor.from_pretrained('google/vit-base-patch16-224')
|
16 |
+
model = ViTForImageClassification.from_pretrained('google/vit-base-patch16-224')
|
17 |
|
18 |
#inputs = processor(images=image, return_tensors="pt")
|
19 |
#outputs = model(**inputs)
|