Spaces:
Running
on
Zero
Running
on
Zero
Rename gradio_ti2v.py to app.py
Browse files- gradio_ti2v.py → app.py +3 -2
gradio_ti2v.py → app.py
RENAMED
@@ -7,7 +7,7 @@ from huggingface_hub import snapshot_download
|
|
7 |
from PIL import Image
|
8 |
import random
|
9 |
import numpy as np
|
10 |
-
|
11 |
# Add project root to sys.path to allow importing 'wan'
|
12 |
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
13 |
|
@@ -52,6 +52,7 @@ print("Pipeline initialized and ready.")
|
|
52 |
|
53 |
|
54 |
# --- 2. Gradio Inference Function ---
|
|
|
55 |
def generate_video(
|
56 |
image,
|
57 |
prompt,
|
@@ -151,4 +152,4 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
|
|
151 |
)
|
152 |
|
153 |
if __name__ == "__main__":
|
154 |
-
demo.launch(
|
|
|
7 |
from PIL import Image
|
8 |
import random
|
9 |
import numpy as np
|
10 |
+
import spaces
|
11 |
# Add project root to sys.path to allow importing 'wan'
|
12 |
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
13 |
|
|
|
52 |
|
53 |
|
54 |
# --- 2. Gradio Inference Function ---
|
55 |
+
@spaces.GPU(duration=80)
|
56 |
def generate_video(
|
57 |
image,
|
58 |
prompt,
|
|
|
152 |
)
|
153 |
|
154 |
if __name__ == "__main__":
|
155 |
+
demo.launch()
|