Make the model snippet self contained (#1)
Browse files- Make the model snippet self contained (647e3f52a1e02339a05a0fcfa40cd320f57408cf)
Co-authored-by: Sri Kainkaryam <[email protected]>
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')
|