Huu076 commited on
Commit
3e8e998
·
verified ·
1 Parent(s): fa868d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
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
- gr.inputs.Image(type="pil", label="Input"),
72
- gr.outputs.Image(type="pil", label="Output"),
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,