Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
from PIL import Image
|
4 |
-
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
|
9 |
# ๋ชจ๋ธ ์
๋ ฅ ํฌ๊ธฐ๋ฅผ ํ์ธํฉ๋๋ค.
|
10 |
input_size = model.input_shape[1:3]
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
from PIL import Image
|
4 |
+
import tensorflow as tf
|
5 |
+
from transformers import SegformerFeatureExtractor, TFSegformerForSemanticSegmentation
|
6 |
|
7 |
+
feature_extractor = SegformerFeatureExtractor.from_pretrained(
|
8 |
+
"nvidia/segformer-b1-finetuned-cityscapes-1024-1024"
|
9 |
|
10 |
# ๋ชจ๋ธ ์
๋ ฅ ํฌ๊ธฐ๋ฅผ ํ์ธํฉ๋๋ค.
|
11 |
input_size = model.input_shape[1:3]
|