Johannes commited on
Commit
e2db66d
1 Parent(s): 12a3b31

little fixes

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -49,7 +49,7 @@ def infer(image_input, dst_height:str, dst_width:str):
49
  points_src = torch.tensor([list(ordered_src_coords)], dtype=torch.float32)
50
 
51
  # the destination points are the image vertexes
52
- h, w = dst_height, dst_width # destination size
53
  points_dst = torch.tensor([[
54
  [0., 0.], [w - 1., 0.], [w - 1., h - 1.], [0., h - 1.],
55
  ]], dtype=torch.float32)
@@ -99,7 +99,7 @@ Iface = gr.Interface(
99
  gr.components.Textbox(label="Destination Width"),
100
  ],
101
  outputs=gr.components.Plot(),
102
- examples=[["bruce.png", example_mask], "64", "128"],
103
  title="Homography Warping",
104
  description=description,
105
  ).launch()
 
49
  points_src = torch.tensor([list(ordered_src_coords)], dtype=torch.float32)
50
 
51
  # the destination points are the image vertexes
52
+ h, w = int(dst_height), int(dst_width) # destination size
53
  points_dst = torch.tensor([[
54
  [0., 0.], [w - 1., 0.], [w - 1., h - 1.], [0., h - 1.],
55
  ]], dtype=torch.float32)
 
99
  gr.components.Textbox(label="Destination Width"),
100
  ],
101
  outputs=gr.components.Plot(),
102
+ #examples=[["bruce.png", example_mask], "64", "128"],
103
  title="Homography Warping",
104
  description=description,
105
  ).launch()