please2
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
from transformers import
|
2 |
from PIL import Image
|
3 |
import requests
|
4 |
|
5 |
-
feature_extractor =
|
6 |
model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b1-finetuned-cityscapes-1024-1024")
|
7 |
|
8 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
|
|
1 |
+
from transformers import SegformerImageProcessor, SegformerForSemanticSegmentation
|
2 |
from PIL import Image
|
3 |
import requests
|
4 |
|
5 |
+
feature_extractor = SegformerImageProcessor.from_pretrained("nvidia/segformer-b1-finetuned-cityscapes-1024-1024")
|
6 |
model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b1-finetuned-cityscapes-1024-1024")
|
7 |
|
8 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|