Spaces:
Sleeping
Sleeping
solve loading model error
Browse files
app.py
CHANGED
@@ -8,10 +8,12 @@ import tensorflow as tf
|
|
8 |
from transformers import SegformerFeatureExtractor, TFSegformerForSemanticSegmentation
|
9 |
|
10 |
feature_extractor = SegformerFeatureExtractor.from_pretrained(
|
11 |
-
"nielsr/segformer-b0-finetuned-segments-sidewalk"
|
|
|
12 |
)
|
13 |
model = TFSegformerForSemanticSegmentation.from_pretrained(
|
14 |
-
"nielsr/segformer-b0-finetuned-segments-sidewalk"
|
|
|
15 |
)
|
16 |
|
17 |
def ade_palette():
|
|
|
8 |
from transformers import SegformerFeatureExtractor, TFSegformerForSemanticSegmentation
|
9 |
|
10 |
feature_extractor = SegformerFeatureExtractor.from_pretrained(
|
11 |
+
"nielsr/segformer-b0-finetuned-segments-sidewalk",
|
12 |
+
from_pt=True
|
13 |
)
|
14 |
model = TFSegformerForSemanticSegmentation.from_pretrained(
|
15 |
+
"nielsr/segformer-b0-finetuned-segments-sidewalk",
|
16 |
+
from_pt=True
|
17 |
)
|
18 |
|
19 |
def ade_palette():
|