nev commited on
Commit
3d2dcbc
1 Parent(s): 03ca925

oh, looked at file. forgor \n

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -25,7 +25,7 @@ def get_depth(rgb):
25
  positions[:, :-1] *= positions[:, -1:]
26
  positions[:, :2] *= -1
27
 
28
- pick_edges = depth > 0
29
  y, x = (t.flatten() for t in np.mgrid[0:h, 0:w])
30
  faces = np.concatenate((
31
  np.stack((y * w + x,
@@ -49,9 +49,9 @@ def save_obj(positions, rgb, faces, filename):
49
  with open(filename, "w") as f:
50
  for position, color in zip(positions, rgb):
51
  f.write(
52
- f"v {' '.join(map(str, position))} {' '.join(map(str, color))}")
53
  for face in faces:
54
- f.write(f"f {' '.join(map(str, face))}")
55
 
56
 
57
  gr.Interface(fn=get_depth, inputs=[
 
25
  positions[:, :-1] *= positions[:, -1:]
26
  positions[:, :2] *= -1
27
 
28
+ pick_edges = depth < 0
29
  y, x = (t.flatten() for t in np.mgrid[0:h, 0:w])
30
  faces = np.concatenate((
31
  np.stack((y * w + x,
 
49
  with open(filename, "w") as f:
50
  for position, color in zip(positions, rgb):
51
  f.write(
52
+ f"v {' '.join(map(str, position))} {' '.join(map(str, color))}\n")
53
  for face in faces:
54
+ f.write(f"f {' '.join(map(str, face))}\n")
55
 
56
 
57
  gr.Interface(fn=get_depth, inputs=[