File size: 622 Bytes
c2cbc53
8142bba
 
 
 
 
 
 
 
fc7c04c
 
8142bba
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
from transformers import pipeline, AutoTokenizer, AutoModelForSeq2SeqLM, AutoFeatureExtractor, SegformerForSemanticSegmentation


extractor = AutoFeatureExtractor.from_pretrained("nickmuchi/segformer-b4-finetuned-segments-sidewalk")

model = SegformerForSemanticSegmentation.from_pretrained("nickmuchi/segformer-b4-finetuned-segments-sidewalk")

pipe = pipeline(task="feature-extraction", 
                model=model,
                extractor=extractor)

gr.Interface.load(pipe, 
                    title="Segformer",
                    description="Add description",
                    ).launch()