Kazuki Nakayashiki commited on
Commit
04ce5f3
1 Parent(s): 33d2e66

Add some parameters

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -63,7 +63,7 @@ def generate_interpolation(frame1, frame2, frame3, frame4, frame5, frame6, times
63
 
64
  frames = list(util.interpolate_recursively_from_files(input_frames, times_to_interpolate, interpolator))
65
 
66
- mediapy.write_video("out.mp4", frames, fps)
67
 
68
  return "out.mp4"
69
 
@@ -78,17 +78,17 @@ with demo:
78
  with gr.Row():
79
  # upload images and get image strings
80
  input_arr = [
81
- gr.inputs.Image(type='filepath'),
82
- gr.inputs.Image(type='filepath'),
83
- gr.inputs.Image(type='filepath'),
84
- gr.inputs.Image(type='filepath'),
85
- gr.inputs.Image(type='filepath'),
86
- gr.inputs.Image(type='filepath'),
87
  ]
88
 
89
  with gr.Row():
90
- input_arr.append(gr.inputs.Slider(minimum=2, maximum=10, step=1))
91
- input_arr.append(gr.inputs.Slider(minimum=15, maximum=60, step=1))
92
 
93
  # Rows of instructions & buttons
94
  with gr.Row():
 
63
 
64
  frames = list(util.interpolate_recursively_from_files(input_frames, times_to_interpolate, interpolator))
65
 
66
+ mediapy.write_video("out.mp4", frames, fps=fps)
67
 
68
  return "out.mp4"
69
 
 
78
  with gr.Row():
79
  # upload images and get image strings
80
  input_arr = [
81
+ gr.inputs.Image(type='filepath', label="Frame 1"),
82
+ gr.inputs.Image(type='filepath', label="Frame 2"),
83
+ gr.inputs.Image(type='filepath', label="Frame 3"),
84
+ gr.inputs.Image(type='filepath', label="Frame 4"),
85
+ gr.inputs.Image(type='filepath', label="Frame 5"),
86
+ gr.inputs.Image(type='filepath', label="Frame 6"),
87
  ]
88
 
89
  with gr.Row():
90
+ input_arr.append(gr.inputs.Slider(minimum=2, maximum=10, step=1, label="Times to Interpolate"))
91
+ input_arr.append(gr.inputs.Slider(minimum=15, maximum=60, step=1, label="fps"))
92
 
93
  # Rows of instructions & buttons
94
  with gr.Row():