Spaces:
Runtime error
Runtime error
add spaces.GPU decorators
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import os
|
2 |
import gradio as gr
|
|
|
3 |
from utils.gradio_utils import *
|
4 |
import argparse
|
5 |
|
@@ -42,7 +43,7 @@ examples = [
|
|
42 |
["",
|
43 |
"200 - frames (recommended)", 33, "__assets__/gradio_cached_examples/test11.jpg", None],
|
44 |
]
|
45 |
-
|
46 |
def generate(prompt, num_frames, seed, image: np.ndarray):
|
47 |
if num_frames == [] or num_frames is None:
|
48 |
num_frames = 50
|
@@ -65,7 +66,7 @@ def generate(prompt, num_frames, seed, image: np.ndarray):
|
|
65 |
|
66 |
return image, video_file_stage_one, video_file_stage_two
|
67 |
|
68 |
-
|
69 |
def enhance(prompt, num_frames, seed, image: np.ndarray, video:str):
|
70 |
if num_frames == [] or num_frames is None:
|
71 |
num_frames = 50
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
+
import spaces
|
4 |
from utils.gradio_utils import *
|
5 |
import argparse
|
6 |
|
|
|
43 |
["",
|
44 |
"200 - frames (recommended)", 33, "__assets__/gradio_cached_examples/test11.jpg", None],
|
45 |
]
|
46 |
+
@spaces.GPU
|
47 |
def generate(prompt, num_frames, seed, image: np.ndarray):
|
48 |
if num_frames == [] or num_frames is None:
|
49 |
num_frames = 50
|
|
|
66 |
|
67 |
return image, video_file_stage_one, video_file_stage_two
|
68 |
|
69 |
+
@spaces.GPU
|
70 |
def enhance(prompt, num_frames, seed, image: np.ndarray, video:str):
|
71 |
if num_frames == [] or num_frames is None:
|
72 |
num_frames = 50
|