djl234 commited on
Commit
36204dd
·
verified ·
1 Parent(s): 3df51c4

Update app.py

Browse files

[fix]model type to sepia

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ def show_coord(evt: gr.SelectData):
31
  def generate_mask(model_type,img, coord):
32
  #x, y = map(int, coord.split(','))
33
  #
34
- mask = sepia((img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8), stack_image=False)
35
  mask = F.interpolate(torch.from_numpy(mask).unsqueeze(0).unsqueeze(0),size=[img.shape[0],img.shape[1]],mode='bilinear').squeeze().numpy()
36
  col = torch.from_numpy(mask).squeeze().unsqueeze(2).repeat(1,1,3)
37
  col=col/col.max()
 
31
  def generate_mask(model_type,img, coord):
32
  #x, y = map(int, coord.split(','))
33
  #
34
+ mask = sepia(model_type,(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8), stack_image=False)
35
  mask = F.interpolate(torch.from_numpy(mask).unsqueeze(0).unsqueeze(0),size=[img.shape[0],img.shape[1]],mode='bilinear').squeeze().numpy()
36
  col = torch.from_numpy(mask).squeeze().unsqueeze(2).repeat(1,1,3)
37
  col=col/col.max()