Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import pipeline, AutoFeatureExtractor,
|
3 |
|
4 |
-
extractor = AutoFeatureExtractor.from_pretrained("
|
5 |
|
6 |
-
model =
|
7 |
|
8 |
-
pipe = pipeline(task="image-
|
9 |
model=model,
|
10 |
-
)
|
11 |
|
12 |
-
gr.Interface.
|
13 |
-
title="
|
14 |
description="Add description",
|
15 |
).launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline, AutoFeatureExtractor, SegformerForSemanticSegmentation
|
3 |
|
4 |
+
extractor = AutoFeatureExtractor.from_pretrained("nickmuchi/segformer-b4-finetuned-segments-sidewalk")
|
5 |
|
6 |
+
model = SegformerForSemanticSegmentation.from_pretrained("nickmuchi/segformer-b4-finetuned-segments-sidewalk")
|
7 |
|
8 |
+
pipe = pipeline(task="image-segmentation",
|
9 |
model=model,
|
10 |
+
feature_extractor=extractor)
|
11 |
|
12 |
+
gr.Interface.from_pipeline(pipe,
|
13 |
+
title="Segformer",
|
14 |
description="Add description",
|
15 |
).launch()
|