namkwonwoo commited on
Commit
ea92b12
1 Parent(s): 7565072

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -13
app.py CHANGED
@@ -5,21 +5,10 @@ import matplotlib.pyplot as plt
5
  import numpy as np
6
  from PIL import Image
7
  import tensorflow as tf
8
-
9
- # Use a pipeline as a high-level helper
10
- from transformers import pipeline
11
-
12
- pipe = pipeline("image-segmentation", model="mattmdjaga/segformer_b2_clothes")
13
-
14
- from transformers import AutoFeatureExtractor, SegformerForSemanticSegmentation
15
-
16
- feature_extractor = AutoFeatureExtractor.from_pretrained("mattmdjaga/segformer_b2_clothes")
17
- model = SegformerForSemanticSegmentation.from_pretrained("mattmdjaga/segformer_b2_clothes")
18
-
19
- '''조ㅛ from transformers import SegformerFeatureExtractor, TFSegformerForSemanticSegmentation
20
 
21
  feature_extractor = SegformerFeatureExtractor.from_pretrained("mattmdjaga/segformer_b2_clothes")
22
- model = TFSegformerForSemanticSegmentation.from_pretrained("mattmdjaga/segformer_b2_clothes")'''
23
 
24
  def ade_palette():
25
  """ADE20K palette that maps each class to RGB values."""
 
5
  import numpy as np
6
  from PIL import Image
7
  import tensorflow as tf
8
+ from transformers import SegformerFeatureExtractor, TFSegformerForSemanticSegmentation
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  feature_extractor = SegformerFeatureExtractor.from_pretrained("mattmdjaga/segformer_b2_clothes")
11
+ model = TFSegformerForSemanticSegmentation.from_pretrained("mattmdjaga/segformer_b2_clothes")
12
 
13
  def ade_palette():
14
  """ADE20K palette that maps each class to RGB values."""