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()