jaranohaal commited on
Commit
aa884ae
1 Parent(s): 5147416

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -38,11 +38,11 @@ from transformers import ViTForImageClassification, ViTFeatureExtractor
38
  from PIL import Image
39
 
40
  # Load the model and feature extractor
41
- model = ViTForImageClassification.from_pretrained('your-username/vit-base-violence')
42
- feature_extractor = ViTFeatureExtractor.from_pretrained('your-username/vit-base-violence')
43
 
44
  # Load an image
45
- image = Image.open('path_to_your_image.jpg')
46
 
47
  # Preprocess the image
48
  inputs = feature_extractor(images=image, return_tensors="pt")
 
38
  from PIL import Image
39
 
40
  # Load the model and feature extractor
41
+ model = ViTForImageClassification.from_pretrained('jaranohaal/vit-base-violence-detection')
42
+ feature_extractor = ViTFeatureExtractor.from_pretrained('jaranohaal/vit-base-violence-detection')
43
 
44
  # Load an image
45
+ image = Image.open('image.jpg')
46
 
47
  # Preprocess the image
48
  inputs = feature_extractor(images=image, return_tensors="pt")