karolmajek commited on
Commit
f700c84
1 Parent(s): e6b2315

remove upscale to original res - doesn't work on :hugging: spaces yet

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,7 +25,8 @@ feature_extractor = SegformerFeatureExtractor.from_pretrained(model_name)
25
  model = SegformerForSemanticSegmentation.from_pretrained(model_name)
26
 
27
  def inference(image):
28
- inputs = feature_extractor(images=image.resize((1024,1024)), return_tensors="pt")
 
29
  outputs = model(**inputs)
30
 
31
  # First, rescale logits to original image size
25
  model = SegformerForSemanticSegmentation.from_pretrained(model_name)
26
 
27
  def inference(image):
28
+ image = image.resize((1024,1024))
29
+ inputs = feature_extractor(images=image, return_tensors="pt")
30
  outputs = model(**inputs)
31
 
32
  # First, rescale logits to original image size