app
Browse files
app.py
CHANGED
|
@@ -60,7 +60,7 @@ def load_large_files(relative_path):
|
|
| 60 |
# file.write(chunk)
|
| 61 |
# bar.update(len(chunk))
|
| 62 |
# print(f"File downloaded successfully and saved as: {file_path}")
|
| 63 |
-
file_path = hf_hub_download(repo_id="mingyuan/data_hf", filename=relative_path, repo_type="dataset"
|
| 64 |
return file_path
|
| 65 |
|
| 66 |
def motion_temporal_filter(motion, sigma=1):
|
|
@@ -105,10 +105,7 @@ if type == "local":
|
|
| 105 |
"std": "../data_hf/data/motionverse/statistics/std.npy",
|
| 106 |
"skeleton": "../data_hf/data/motionverse/statistics/skeleton.npy",
|
| 107 |
"lmm": "../data_hf/data/motionverse/pretrained/lmm_small_demo.pth",
|
| 108 |
-
"imagebind": "../data_hf/data/motionverse/pretrained/imagebind_huge.pth"
|
| 109 |
-
"audio_placeholder": "../data_hf/examples/placeholder.m4a",
|
| 110 |
-
"audio_surprise": "../data_hf/examples/surprise.m4a",
|
| 111 |
-
"audio_angry": "../data_hf/examples/angry.m4a"
|
| 112 |
}
|
| 113 |
os.environ["NO_PROXY"] = os.environ["no_proxy"] = "localhost, 127.0.0.1:7860"
|
| 114 |
else:
|
|
@@ -117,14 +114,15 @@ else:
|
|
| 117 |
"std": "data/motionverse/statistics/std.npy",
|
| 118 |
"skeleton": "data/motionverse/statistics/skeleton.npy",
|
| 119 |
"lmm": "data/motionverse/pretrained/lmm_small_demo.pth",
|
| 120 |
-
"imagebind": "data/motionverse/pretrained/imagebind_huge.pth"
|
| 121 |
-
"audio_placeholder": "examples/placeholder.m4a",
|
| 122 |
-
"audio_surprise": "examples/surprise.m4a",
|
| 123 |
-
"audio_angry": "examples/angry.m4a"
|
| 124 |
}
|
| 125 |
load_file_list = {}
|
| 126 |
for key in src_file_list.keys():
|
| 127 |
load_file_list[key] = load_large_files(src_file_list[key])
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
|
| 129 |
model_lmm = create_lmm()
|
| 130 |
model_imagebind = imagebind_huge(pretrained=True, ckpt_path=load_file_list["imagebind"])
|
|
|
|
| 60 |
# file.write(chunk)
|
| 61 |
# bar.update(len(chunk))
|
| 62 |
# print(f"File downloaded successfully and saved as: {file_path}")
|
| 63 |
+
file_path = hf_hub_download(repo_id="mingyuan/data_hf", filename=relative_path, repo_type="dataset")
|
| 64 |
return file_path
|
| 65 |
|
| 66 |
def motion_temporal_filter(motion, sigma=1):
|
|
|
|
| 105 |
"std": "../data_hf/data/motionverse/statistics/std.npy",
|
| 106 |
"skeleton": "../data_hf/data/motionverse/statistics/skeleton.npy",
|
| 107 |
"lmm": "../data_hf/data/motionverse/pretrained/lmm_small_demo.pth",
|
| 108 |
+
"imagebind": "../data_hf/data/motionverse/pretrained/imagebind_huge.pth"
|
|
|
|
|
|
|
|
|
|
| 109 |
}
|
| 110 |
os.environ["NO_PROXY"] = os.environ["no_proxy"] = "localhost, 127.0.0.1:7860"
|
| 111 |
else:
|
|
|
|
| 114 |
"std": "data/motionverse/statistics/std.npy",
|
| 115 |
"skeleton": "data/motionverse/statistics/skeleton.npy",
|
| 116 |
"lmm": "data/motionverse/pretrained/lmm_small_demo.pth",
|
| 117 |
+
"imagebind": "data/motionverse/pretrained/imagebind_huge.pth"
|
|
|
|
|
|
|
|
|
|
| 118 |
}
|
| 119 |
load_file_list = {}
|
| 120 |
for key in src_file_list.keys():
|
| 121 |
load_file_list[key] = load_large_files(src_file_list[key])
|
| 122 |
+
|
| 123 |
+
load_file_list["audio_placeholder"] = "./examples/placeholder.m4a"
|
| 124 |
+
load_file_list["audio_surprise"] = "./examples/surprise.m4a"
|
| 125 |
+
load_file_list["audio_angry"] = "./examples/angry.m4a"
|
| 126 |
|
| 127 |
model_lmm = create_lmm()
|
| 128 |
model_imagebind = imagebind_huge(pretrained=True, ckpt_path=load_file_list["imagebind"])
|