Update README.md
Browse files
README.md
CHANGED
|
@@ -11,12 +11,13 @@ pipeline_tag: image-classification
|
|
| 11 |
|
| 12 |
### Запуск модели
|
| 13 |
```python
|
|
|
|
| 14 |
from PIL import Image
|
| 15 |
-
from transformers import ResNetForImageClassification
|
| 16 |
|
| 17 |
processor = AutoImageProcessor.from_pretrained("glazzova/body_type")
|
| 18 |
model = ResNetForImageClassification.from_pretrained('glazzova/body_type')
|
| 19 |
-
image = Image.open('
|
| 20 |
inputs = processor(image, return_tensors="pt")
|
| 21 |
|
| 22 |
with torch.no_grad():
|
|
|
|
| 11 |
|
| 12 |
### Запуск модели
|
| 13 |
```python
|
| 14 |
+
import torch
|
| 15 |
from PIL import Image
|
| 16 |
+
from transformers import ResNetForImageClassification, AutoImageProcessor
|
| 17 |
|
| 18 |
processor = AutoImageProcessor.from_pretrained("glazzova/body_type")
|
| 19 |
model = ResNetForImageClassification.from_pretrained('glazzova/body_type')
|
| 20 |
+
image = Image.open('/Users/swag2004/Downloads/photo_2024-05-11 16.17.08.jpeg')
|
| 21 |
inputs = processor(image, return_tensors="pt")
|
| 22 |
|
| 23 |
with torch.no_grad():
|