Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
import torch
|
@@ -5,11 +6,12 @@ from PIL import Image
|
|
5 |
from inference.flovd_demo import generate_video
|
6 |
import requests
|
7 |
import shutil
|
8 |
-
import os
|
9 |
from huggingface_hub import snapshot_download
|
10 |
|
|
|
11 |
hf_token = os.getenv("HF_TOKEN")
|
12 |
|
|
|
13 |
snapshot_download(
|
14 |
repo_id="roll-ai/FloVD-weights",
|
15 |
repo_type="dataset",
|
@@ -18,6 +20,15 @@ snapshot_download(
|
|
18 |
token=hf_token
|
19 |
)
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
# # --------- SETUP CODE: Download models if not found ---------
|
22 |
# FVSM_PATH = "./ckpt/FVSM/FloVD_FVSM_Controlnet.pt"
|
23 |
# OMSM_PATH = "./ckpt/OMSM"
|
|
|
1 |
+
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
import torch
|
|
|
6 |
from inference.flovd_demo import generate_video
|
7 |
import requests
|
8 |
import shutil
|
|
|
9 |
from huggingface_hub import snapshot_download
|
10 |
|
11 |
+
# Get the HF token from environment variable
|
12 |
hf_token = os.getenv("HF_TOKEN")
|
13 |
|
14 |
+
# Download weights into ./ckpt
|
15 |
snapshot_download(
|
16 |
repo_id="roll-ai/FloVD-weights",
|
17 |
repo_type="dataset",
|
|
|
20 |
token=hf_token
|
21 |
)
|
22 |
|
23 |
+
# ✅ Print the directory tree of ./ckpt
|
24 |
+
print("📂 Contents of ./ckpt directory:")
|
25 |
+
for root, dirs, files in os.walk("./ckpt"):
|
26 |
+
level = root.replace("./ckpt", "").count(os.sep)
|
27 |
+
indent = " " * 4 * level
|
28 |
+
print(f"{indent}{os.path.basename(root)}/")
|
29 |
+
subindent = " " * 4 * (level + 1)
|
30 |
+
for f in files:
|
31 |
+
print(f"{subindent}{f}")
|
32 |
# # --------- SETUP CODE: Download models if not found ---------
|
33 |
# FVSM_PATH = "./ckpt/FVSM/FloVD_FVSM_Controlnet.pt"
|
34 |
# OMSM_PATH = "./ckpt/OMSM"
|