Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ extractor = AutoFeatureExtractor.from_pretrained("salaz055/my_extractor_segmenta
|
|
7 |
model = SegformerForSemanticSegmentation.from_pretrained("salaz055/my-segmentation-model")
|
8 |
|
9 |
def classify(im):
|
10 |
-
inputs = extractor(images=im, return_tensors="pt")
|
11 |
outputs = model(**inputs)
|
12 |
logits = outputs.logits
|
13 |
classes = logits[0].detach().cpu().numpy().argmax(axis=0)
|
|
|
7 |
model = SegformerForSemanticSegmentation.from_pretrained("salaz055/my-segmentation-model")
|
8 |
|
9 |
def classify(im):
|
10 |
+
inputs = extractor(images=im, return_tensors="pt")
|
11 |
outputs = model(**inputs)
|
12 |
logits = outputs.logits
|
13 |
classes = logits[0].detach().cpu().numpy().argmax(axis=0)
|