fffiloni commited on
Commit
43af4fa
·
1 Parent(s): b827d8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -114,7 +114,7 @@ def normalize_and_save_video(input_video_path, output_video_path):
114
  def run_inference(prompt, video_path, condition, video_length, seed):
115
 
116
  # Get FPS of original video input
117
- target_fps = get_video_dimension(video_path)[2]
118
  if target_fps > 12 :
119
  print(f"FPS is too high")
120
  target_fps = 12
@@ -171,9 +171,10 @@ with gr.Blocks(css=css) as demo:
171
  video_path = gr.Video(source="upload", type="filepath", visible=True)
172
  prompt = gr.Textbox(label="prompt")
173
  with gr.Column():
174
- condition = gr.Dropdown(label="Condition", choices=["depth", "canny", "pose"], value="depth")
175
- video_length = gr.Slider(label="Video length", info="How many frames do you want to process ?", minimum=1, maximum=12, step=1, value=2)
176
- seed = gr.Number(label="seed", value=42)
 
177
  submit_btn = gr.Button("Submit")
178
  with gr.Column():
179
  video_res = gr.Video(label="result")
 
114
  def run_inference(prompt, video_path, condition, video_length, seed):
115
 
116
  # Get FPS of original video input
117
+ target_fps = math.floor(get_video_dimension(video_path)[2])
118
  if target_fps > 12 :
119
  print(f"FPS is too high")
120
  target_fps = 12
 
171
  video_path = gr.Video(source="upload", type="filepath", visible=True)
172
  prompt = gr.Textbox(label="prompt")
173
  with gr.Column():
174
+ video_length = gr.Slider(label="Video length", info="How many frames do you want to process ? For demo purpose, max is set to 24", minimum=1, maximum=12, step=1, value=2)
175
+ with gr.Row():
176
+ condition = gr.Dropdown(label="Condition", choices=["depth", "canny", "pose"], value="depth")
177
+ seed = gr.Number(label="seed", value=42)
178
  submit_btn = gr.Button("Submit")
179
  with gr.Column():
180
  video_res = gr.Video(label="result")