1inkusFace commited on
Commit
926c659
·
verified ·
1 Parent(s): d67bd0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,7 +1,10 @@
1
- import gradio as gr
 
 
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.