Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
0d9d0ee
1
Parent(s):
b24062d
Display examples (#15)
Browse files- Display examples (ae079e4598a4afea2af1468e52ca0511503c733e)
Co-authored-by: Fabrice TIERCELIN <Fabrice-TIERCELIN@users.noreply.huggingface.co>
app.py
CHANGED
@@ -108,6 +108,19 @@ with gr.Blocks() as demo:
|
|
108 |
|
109 |
image.upload(fn=resize_image, inputs=image, outputs=image, queue=False)
|
110 |
generate_btn.click(fn=sample, inputs=[image, seed, randomize_seed, motion_bucket_id, fps_id, noise_aug_strength, decoding_t, frame_format], outputs=[video, gallery, seed], api_name="video")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
if __name__ == "__main__":
|
113 |
demo.launch(share=True, show_api=False)
|
|
|
108 |
|
109 |
image.upload(fn=resize_image, inputs=image, outputs=image, queue=False)
|
110 |
generate_btn.click(fn=sample, inputs=[image, seed, randomize_seed, motion_bucket_id, fps_id, noise_aug_strength, decoding_t, frame_format], outputs=[video, gallery, seed], api_name="video")
|
111 |
+
|
112 |
+
gr.Examples(
|
113 |
+
examples=[
|
114 |
+
["Examples/Fire.webp", 25, 127, 0.1, 3, "png", 42, True],
|
115 |
+
["Examples/Town.jpeg", 25, 127, 0.1, 3, "png", 42, True],
|
116 |
+
["Examples/Water.png", 25, 127, 0.1, 3, "png", 42, True]
|
117 |
+
],
|
118 |
+
inputs=[image, fps_id, motion_bucket_id, noise_aug_strength, decoding_t, frame_format, seed, randomize_seed],
|
119 |
+
outputs=[video, gallery, seed],
|
120 |
+
fn=sample,
|
121 |
+
run_on_click=True,
|
122 |
+
cache_examples=False,
|
123 |
+
)
|
124 |
|
125 |
if __name__ == "__main__":
|
126 |
demo.launch(share=True, show_api=False)
|