Artiprocher ysharma HF staff commited on
Commit
14c5bb2
1 Parent(s): 55892cf

updated examples code (#1)

Browse files

- updated examples code (f5fc453612f37016475ba7933e8aa64caaa46dde)


Co-authored-by: yuvraj sharma <ysharma@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -56,6 +56,11 @@ def crop_and_resize(image):
56
 
57
 
58
  pipe = get_i2v_pipeline()
 
 
 
 
 
59
  with gr.Blocks() as demo:
60
  gr.Markdown('''
61
  # ExVideo
@@ -93,7 +98,8 @@ To use this model, please refer to [DiffSynth](https://github.com/modelscope/Dif
93
  ],
94
  inputs=image,
95
  outputs=[video, seed],
96
- fn=sample,
 
97
  )
98
 
99
  if __name__ == "__main__":
 
56
 
57
 
58
  pipe = get_i2v_pipeline()
59
+
60
+ def process_examples(image):
61
+ file_path, seed = sample(image, seed=0, randomize_seed=True, motion_bucket_id=100, num_inference_steps=25 )
62
+ return file_path, seed
63
+
64
  with gr.Blocks() as demo:
65
  gr.Markdown('''
66
  # ExVideo
 
98
  ],
99
  inputs=image,
100
  outputs=[video, seed],
101
+ fn=process_examples,
102
+ cache_examples="lazy",
103
  )
104
 
105
  if __name__ == "__main__":