jeremyrmanning commited on
Commit
db5eded
·
1 Parent(s): 9acea29

debugging image interpolation

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -62,11 +62,11 @@ def generate_interpolation(text, n=4):
62
  frames = []
63
  for i, g in enumerate(generated_images):
64
  frames.append(f'frame_{i}.png')
65
- g[i].save(frames[-1])
66
 
67
- frames = list(util.interpolate_recursively_from_files(frames, n, interpolator))
68
 
69
- mediapy.write_video("out.mp4", frames, fps=10)
70
 
71
  return "out.mp4"
72
 
@@ -74,7 +74,7 @@ def generate_interpolation(text, n=4):
74
  demo = gr.Blocks()
75
 
76
  with demo:
77
- text = gr.Textbox(placeholder='human, human head, brain, brain in a computer, humanoid robot', label='input a comma-separated list of terms')
78
  button_gen_video = gr.Button("Generate Video")
79
  output_interpolation = gr.Video(label="Generated Video")
80
  button_gen_video.click(fn=generate_interpolation, inputs=text, outputs=output_interpolation)
 
62
  frames = []
63
  for i, g in enumerate(generated_images):
64
  frames.append(f'frame_{i}.png')
65
+ g.save(frames[-1])
66
 
67
+ vid = list(util.interpolate_recursively_from_files(frames, n, interpolator))
68
 
69
+ mediapy.write_video("out.mp4", vid, fps=10)
70
 
71
  return "out.mp4"
72
 
 
74
  demo = gr.Blocks()
75
 
76
  with demo:
77
+ text = gr.Textbox(placeholder='human, human head, brain, brain in a computer, humanoid robot', label='Input a comma-separated list of terms')
78
  button_gen_video = gr.Button("Generate Video")
79
  output_interpolation = gr.Video(label="Generated Video")
80
  button_gen_video.click(fn=generate_interpolation, inputs=text, outputs=output_interpolation)