Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
|
13 |
|
14 |
# Create the gr.State component *outside* the gr.Blocks context
|
15 |
|
16 |
-
predictor
|
17 |
|
18 |
def init_predictor(task_type: str):
|
19 |
from skyreelsinfer import TaskType
|
@@ -40,7 +40,6 @@ def init_predictor(task_type: str):
|
|
40 |
return f"Error loading model: {e}", None
|
41 |
|
42 |
predictor = init_predictor('i2v')
|
43 |
-
global predictor
|
44 |
|
45 |
@spaces.GPU(duration=80)
|
46 |
def generate_video(prompt, image, predictor):
|
|
|
13 |
|
14 |
# Create the gr.State component *outside* the gr.Blocks context
|
15 |
|
16 |
+
global predictor
|
17 |
|
18 |
def init_predictor(task_type: str):
|
19 |
from skyreelsinfer import TaskType
|
|
|
40 |
return f"Error loading model: {e}", None
|
41 |
|
42 |
predictor = init_predictor('i2v')
|
|
|
43 |
|
44 |
@spaces.GPU(duration=80)
|
45 |
def generate_video(prompt, image, predictor):
|