Spaces:
Sleeping
Sleeping
Nunzio commited on
Commit ·
22974e8
1
Parent(s): 6674582
minor tweaks
Browse files
app.py
CHANGED
|
@@ -13,9 +13,9 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
| 13 |
|
| 14 |
|
| 15 |
MODELS = {
|
| 16 |
-
"BISENET-BASE": loadModel('bisenet', device, 'weight_Base.pth'),
|
| 17 |
"BISENET-BEST": loadModel('bisenet', device, 'weight_Best.pth'),
|
| 18 |
-
"BISENETV2-BASE": loadModel('bisenetv2', device, 'weight_Base.pth'),
|
| 19 |
"BISENETV2-BEST": loadModel('bisenetv2', device, 'weight_Best.pth')
|
| 20 |
}
|
| 21 |
|
|
@@ -70,7 +70,10 @@ with gr.Blocks(title="Semantic Segmentation Predictors") as demo:
|
|
| 70 |
with gr.Column():
|
| 71 |
image_input = gr.Image(type="pil", label="Upload image")
|
| 72 |
model_selector = gr.Radio(
|
| 73 |
-
choices=["BiSeNet-Base",
|
|
|
|
|
|
|
|
|
|
| 74 |
value="BiSeNet-Base",
|
| 75 |
label="Select the real time segmentation model"
|
| 76 |
)
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
MODELS = {
|
| 16 |
+
# "BISENET-BASE": loadModel('bisenet', device, 'weight_Base.pth'),
|
| 17 |
"BISENET-BEST": loadModel('bisenet', device, 'weight_Best.pth'),
|
| 18 |
+
# "BISENETV2-BASE": loadModel('bisenetv2', device, 'weight_Base.pth'),
|
| 19 |
"BISENETV2-BEST": loadModel('bisenetv2', device, 'weight_Best.pth')
|
| 20 |
}
|
| 21 |
|
|
|
|
| 70 |
with gr.Column():
|
| 71 |
image_input = gr.Image(type="pil", label="Upload image")
|
| 72 |
model_selector = gr.Radio(
|
| 73 |
+
choices=[ #"BiSeNet-Base",
|
| 74 |
+
"BiSeNet-Best",
|
| 75 |
+
# "BiSeNetV2-Base",
|
| 76 |
+
"BiSeNetV2-Best"],
|
| 77 |
value="BiSeNet-Base",
|
| 78 |
label="Select the real time segmentation model"
|
| 79 |
)
|