multimodalart HF Staff commited on
Commit
1ea50b5
·
verified ·
1 Parent(s): 845c0fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -221,7 +221,7 @@ def create_video_from_images(image_list, fps=4):
221
  video.release()
222
  return video_path
223
 
224
- def loop_outpainting(image, width, height, overlap_width, num_inference_steps, resize_option, custom_resize_size, prompt_input, alignment, num_iterations):
225
  image_list = []
226
  current_image = image
227
 
@@ -237,7 +237,7 @@ def loop_outpainting(image, width, height, overlap_width, num_inference_steps, r
237
  current_image = new_image
238
 
239
  # Create video from image list
240
- video_path = create_video_from_images(image_list)
241
  return video_path
242
 
243
  css = """
@@ -330,7 +330,7 @@ with gr.Blocks(css=css) as demo:
330
  )
331
  with gr.Row():
332
  num_iterations = gr.Slider(label="Number of iterations", minimum=2, maximum=1024, step=1, value=10)
333
-
334
  gr.Examples(
335
  examples=[
336
  ["./examples/example_1.webp", 1280, 720, "Middle"],
@@ -421,7 +421,7 @@ with gr.Blocks(css=css) as demo:
421
  loop_button.click(
422
  fn=loop_outpainting,
423
  inputs=[input_image, width_slider, height_slider, overlap_width, num_inference_steps,
424
- resize_option, custom_resize_size, prompt_input, alignment_dropdown, num_iterations],
425
  outputs=video_output,
426
  )
427
 
 
221
  video.release()
222
  return video_path
223
 
224
+ def loop_outpainting(image, width, height, overlap_width, num_inference_steps, resize_option, custom_resize_size, prompt_input, alignment, num_iterations, fps):
225
  image_list = []
226
  current_image = image
227
 
 
237
  current_image = new_image
238
 
239
  # Create video from image list
240
+ video_path = create_video_from_images(image_list, fps)
241
  return video_path
242
 
243
  css = """
 
330
  )
331
  with gr.Row():
332
  num_iterations = gr.Slider(label="Number of iterations", minimum=2, maximum=1024, step=1, value=10)
333
+ fps = gr.Slider(label="fps", minimum=1, maximum=24)
334
  gr.Examples(
335
  examples=[
336
  ["./examples/example_1.webp", 1280, 720, "Middle"],
 
421
  loop_button.click(
422
  fn=loop_outpainting,
423
  inputs=[input_image, width_slider, height_slider, overlap_width, num_inference_steps,
424
+ resize_option, custom_resize_size, prompt_input, alignment_dropdown, num_iterations, fps],
425
  outputs=video_output,
426
  )
427