app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
from transformers import SegformerFeatureExtractor, SegformerForSemanticSegmentation
|
2 |
from PIL import Image
|
3 |
import requests
|
|
|
|
|
4 |
|
5 |
feature_extractor = SegformerFeatureExtractor.from_pretrained("nvidia/segformer-b0-finetuned-cityscapes-1024-1024")
|
6 |
model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b0-finetuned-cityscapes-1024-1024")
|
|
|
1 |
from transformers import SegformerFeatureExtractor, SegformerForSemanticSegmentation
|
2 |
from PIL import Image
|
3 |
import requests
|
4 |
+
import os
|
5 |
+
os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0'
|
6 |
|
7 |
feature_extractor = SegformerFeatureExtractor.from_pretrained("nvidia/segformer-b0-finetuned-cityscapes-1024-1024")
|
8 |
model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b0-finetuned-cityscapes-1024-1024")
|