nielsr HF staff srib commited on
Commit
a8b6f5e
1 Parent(s): 3b27791

Make the model snippet self contained (#1)

Browse files

- Make the model snippet self contained (647e3f52a1e02339a05a0fcfa40cd320f57408cf)


Co-authored-by: Sri Kainkaryam <[email protected]>

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')