Make the model snippet self contained

#1
by srib - opened
Files changed (1) hide show
  1. README.md +1 -0
README.md CHANGED
@@ -42,6 +42,7 @@ from PIL import Image
42
 
43
  # load ADE20k image
44
  ds = load_dataset("hf-internal-testing/fixtures_ade20k", split="test")
 
45
 
46
  feature_extractor = BeitFeatureExtractor.from_pretrained('microsoft/beit-base-finetuned-ade-640-640')
47
  model = BeitForSemanticSegmentation.from_pretrained('microsoft/beit-base-finetuned-ade-640-640')
 
42
 
43
  # load ADE20k image
44
  ds = load_dataset("hf-internal-testing/fixtures_ade20k", split="test")
45
+ image = Image.open(ds[0]['file'])
46
 
47
  feature_extractor = BeitFeatureExtractor.from_pretrained('microsoft/beit-base-finetuned-ade-640-640')
48
  model = BeitForSemanticSegmentation.from_pretrained('microsoft/beit-base-finetuned-ade-640-640')