Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
-
import
|
|
|
|
|
2 |
import torch
|
|
|
|
|
3 |
import imageio
|
4 |
-
import os
|
5 |
import time
|
6 |
import random
|
7 |
import gc
|
@@ -35,6 +38,7 @@ pipe = Image2VideoPipeline(
|
|
35 |
print("Model loaded successfully.")
|
36 |
|
37 |
# --- Inference Function ---
|
|
|
38 |
def generate_video(input_image, prompt, guidance_scale, inference_steps, num_frames, fps, seed):
|
39 |
"""
|
40 |
Main function to generate video from an image and a prompt.
|
|
|
1 |
+
import spaces
|
2 |
+
import os
|
3 |
+
|
4 |
import torch
|
5 |
+
|
6 |
+
import gradio as gr
|
7 |
import imageio
|
|
|
8 |
import time
|
9 |
import random
|
10 |
import gc
|
|
|
38 |
print("Model loaded successfully.")
|
39 |
|
40 |
# --- Inference Function ---
|
41 |
+
@spaces.GPU(required=True)
|
42 |
def generate_video(input_image, prompt, guidance_scale, inference_steps, num_frames, fps, seed):
|
43 |
"""
|
44 |
Main function to generate video from an image and a prompt.
|