Update app.py
Browse files
app.py
CHANGED
@@ -66,10 +66,17 @@ torch.hub.download_url_to_file('https://hai.stanford.edu/sites/default/files/sty
|
|
66 |
model = torch.hub.load('pytorch/vision:v0.6.0', 'deeplabv3_resnet101', pretrained=True)
|
67 |
model.eval()
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
gr.Interface(
|
70 |
-
inference,
|
71 |
-
|
72 |
-
|
73 |
title=title,
|
74 |
description=description,
|
75 |
article=article,
|
|
|
66 |
model = torch.hub.load('pytorch/vision:v0.6.0', 'deeplabv3_resnet101', pretrained=True)
|
67 |
model.eval()
|
68 |
|
69 |
+
inputs_image = [
|
70 |
+
gr.components.Image(type="filepath", label="Input Image"),
|
71 |
+
]
|
72 |
+
outputs_image = [
|
73 |
+
gr.components.Image(type="numpy", label="Output Image"),
|
74 |
+
]
|
75 |
+
|
76 |
gr.Interface(
|
77 |
+
fn=inference,
|
78 |
+
inputs=inputs_image,
|
79 |
+
outputs=outputs_image,
|
80 |
title=title,
|
81 |
description=description,
|
82 |
article=article,
|