Commit
·
c907ab3
1
Parent(s):
f58ac54
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
|
|
| 27 |
|
| 28 |
max_64_bit_int = 2**63 - 1
|
| 29 |
|
| 30 |
-
def
|
| 31 |
image: Image,
|
| 32 |
seed: int,
|
| 33 |
motion_bucket_id: int = 127,
|
|
@@ -121,7 +121,7 @@ with gr.Blocks() as demo:
|
|
| 121 |
motion_bucket_id = gr.Slider(label="Motion bucket id", info="Controls how much motion to add/remove from the image", value=127, minimum=1, maximum=255)
|
| 122 |
fps_id = gr.Slider(label="Frames per second", info="The length of your video in seconds will be 25/fps", value=6, minimum=5, maximum=30)
|
| 123 |
|
| 124 |
-
generate_btn.click(fn=
|
| 125 |
|
| 126 |
if __name__ == "__main__":
|
| 127 |
demo.queue(max_size=20).launch()
|
|
|
|
| 27 |
|
| 28 |
max_64_bit_int = 2**63 - 1
|
| 29 |
|
| 30 |
+
def generate_video(
|
| 31 |
image: Image,
|
| 32 |
seed: int,
|
| 33 |
motion_bucket_id: int = 127,
|
|
|
|
| 121 |
motion_bucket_id = gr.Slider(label="Motion bucket id", info="Controls how much motion to add/remove from the image", value=127, minimum=1, maximum=255)
|
| 122 |
fps_id = gr.Slider(label="Frames per second", info="The length of your video in seconds will be 25/fps", value=6, minimum=5, maximum=30)
|
| 123 |
|
| 124 |
+
generate_btn.click(fn=generate_video, inputs=[image, seed, motion_bucket_id, fps_id, secret_token], outputs=[base64_out], api_name="generate_video")
|
| 125 |
|
| 126 |
if __name__ == "__main__":
|
| 127 |
demo.queue(max_size=20).launch()
|