shyamgupta196 commited on
Commit
3dc8b10
1 Parent(s): 2ea0e86

segformer extracter

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from transformers import AutoFeatureExtractor, SegformerForSemanticSegmentation
2
  from torch import nn
3
  import numpy as np
4
  import matplotlib.pyplot as plt
@@ -7,7 +7,7 @@ from PIL import Image
7
  import gradio as gr
8
 
9
  def seg(image):
10
- feature_extractor = AutoFeatureExtractor.from_pretrained("nvidia/mit-b5")
11
  model = SegformerForSemanticSegmentation.from_pretrained("nvidia/mit-b5")
12
  print(model)
13
 
 
1
+ from transformers import SegformerFeatureExtractor, SegformerForSemanticSegmentation
2
  from torch import nn
3
  import numpy as np
4
  import matplotlib.pyplot as plt
 
7
  import gradio as gr
8
 
9
  def seg(image):
10
+ feature_extractor = SegformerFeatureExtractor.from_pretrained("nvidia/mit-b5")
11
  model = SegformerForSemanticSegmentation.from_pretrained("nvidia/mit-b5")
12
  print(model)
13