Spaces:
Sleeping
Sleeping
Anonymous
commited on
Commit
·
ef0c9ce
1
Parent(s):
17de4da
update app
Browse files
app.py
CHANGED
|
@@ -18,12 +18,14 @@ from funcs import (
|
|
| 18 |
from utils.utils import instantiate_from_config
|
| 19 |
|
| 20 |
ckpt_path_1024 = "checkpoints/base_1024_v1/model.ckpt"
|
| 21 |
-
|
| 22 |
-
|
|
|
|
| 23 |
|
| 24 |
ckpt_path_256 = "checkpoints/base_256_v1/model.pth"
|
| 25 |
-
|
| 26 |
-
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
def infer(prompt):
|
|
@@ -257,6 +259,8 @@ with gr.Blocks(css=css) as demo:
|
|
| 257 |
submit_btn = gr.Button("Generate")
|
| 258 |
video_result = gr.Video(label="Video Output", elem_id="video-output")
|
| 259 |
|
|
|
|
|
|
|
| 260 |
submit_btn.click(fn=infer,
|
| 261 |
inputs=[prompt_in],
|
| 262 |
outputs=[video_result],
|
|
|
|
| 18 |
from utils.utils import instantiate_from_config
|
| 19 |
|
| 20 |
ckpt_path_1024 = "checkpoints/base_1024_v1/model.ckpt"
|
| 21 |
+
ckpt_dir_1024 = "checkpoints/base_1024_v1"
|
| 22 |
+
os.makedirs(ckpt_dir_1024, exist_ok=True)
|
| 23 |
+
# hf_hub_download(repo_id="VideoCrafter/Text2Video-1024", filename="model.ckpt", local_dir=ckpt_dir_1024)
|
| 24 |
|
| 25 |
ckpt_path_256 = "checkpoints/base_256_v1/model.pth"
|
| 26 |
+
ckpt_dir_256 = "checkpoints/base_256_v1"
|
| 27 |
+
os.makedirs(ckpt_dir_256, exist_ok=True)
|
| 28 |
+
hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model.pth", local_dir=ckpt_dir_256)
|
| 29 |
|
| 30 |
|
| 31 |
def infer(prompt):
|
|
|
|
| 259 |
submit_btn = gr.Button("Generate")
|
| 260 |
video_result = gr.Video(label="Video Output", elem_id="video-output")
|
| 261 |
|
| 262 |
+
gr.Examples(examples=examples, inputs=[prompt_in])
|
| 263 |
+
|
| 264 |
submit_btn.click(fn=infer,
|
| 265 |
inputs=[prompt_in],
|
| 266 |
outputs=[video_result],
|