rahul7star commited on
Commit
a4fe0cd
·
verified ·
1 Parent(s): ab45844

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  import gradio as gr
2
  import torch
3
  from diffusers import DiffusionPipeline
@@ -31,6 +34,7 @@ torch._dynamo.config.capture_dynamic_output_shape_ops = True
31
  pipe.transformer.compile()
32
 
33
  # Gradio inference function
 
34
  def generate_video(prompt, seed):
35
  generator = torch.manual_seed(seed) if seed else None
36
 
 
1
+
2
+ import spaces
3
+
4
  import gradio as gr
5
  import torch
6
  from diffusers import DiffusionPipeline
 
34
  pipe.transformer.compile()
35
 
36
  # Gradio inference function
37
+ @spaces.GPU(duration=20)
38
  def generate_video(prompt, seed):
39
  generator = torch.manual_seed(seed) if seed else None
40