Rodrigo_Cobo commited on
Commit
59fba04
1 Parent(s): b8400b6

solved: the problem was in the input name

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -13,7 +13,7 @@ def calculate_depth(model_type, img):
13
  if not os.path.exists('temp'):
14
  os.system('mkdir temp')
15
 
16
- filename = "Images/Input-Test/0.png"
17
 
18
  img.save(filename, "PNG")
19
 
@@ -49,7 +49,7 @@ def calculate_depth(model_type, img):
49
 
50
  formatted = (output * 255.0 / np.max(output)).astype('uint8')
51
  out_im = Image.fromarray(formatted)
52
- out_im.save("Images/Input-Test/0_d.png", "PNG")
53
 
54
  return out_im
55
 
@@ -57,13 +57,14 @@ def wiggle_effect(slider):
57
 
58
  dim = '256'
59
  c_images = '1'
 
60
 
61
  subprocess.run(["python", "main.py", "--gan_type", 'WiggleGAN', "--expandGen", "4", "--expandDis", "4", "--batch_size", c_images, "--cIm", c_images,
62
- "--visdom", "false", "--wiggleDepth", str(slider), "--seedLoad", '31219_110', "--gpu_mode", "false", "--imageDim", dim, "--name_wiggle", "out"
63
  ])
64
  subprocess.run(["python", "WiggleResults/split.py", "--dim", dim])
65
 
66
- return [f'WiggleResults/out.jpg',f'WiggleResults/out_0.gif']
67
 
68
 
69
  with gr.Blocks() as demo:
 
13
  if not os.path.exists('temp'):
14
  os.system('mkdir temp')
15
 
16
+ filename = "Images/Input-Test/1.png"
17
 
18
  img.save(filename, "PNG")
19
 
 
49
 
50
  formatted = (output * 255.0 / np.max(output)).astype('uint8')
51
  out_im = Image.fromarray(formatted)
52
+ out_im.save("Images/Input-Test/1_d.png", "PNG")
53
 
54
  return out_im
55
 
 
57
 
58
  dim = '256'
59
  c_images = '1'
60
+ name_output = 'out'
61
 
62
  subprocess.run(["python", "main.py", "--gan_type", 'WiggleGAN', "--expandGen", "4", "--expandDis", "4", "--batch_size", c_images, "--cIm", c_images,
63
+ "--visdom", "false", "--wiggleDepth", str(slider), "--seedLoad", '31219_110', "--gpu_mode", "false", "--imageDim", dim, "--name_wiggle", name_output
64
  ])
65
  subprocess.run(["python", "WiggleResults/split.py", "--dim", dim])
66
 
67
+ return [f'WiggleResults/'+ name_output + '.jpg',f'WiggleResults/' + name_output + '_0.gif']
68
 
69
 
70
  with gr.Blocks() as demo: