Spaces:
Running
Running
lym0302
commited on
Commit
·
430ec0a
1
Parent(s):
1fd4e9c
doenload model
Browse files
app.py
CHANGED
@@ -14,28 +14,28 @@ sys.path.append(mmaudio_path)
|
|
14 |
from pipeline.pipeline import Pipeline
|
15 |
from third_party.MMAudio.mmaudio.eval_utils import setup_eval_logging
|
16 |
|
17 |
-
#
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
|
40 |
|
41 |
setup_eval_logging()
|
|
|
14 |
from pipeline.pipeline import Pipeline
|
15 |
from third_party.MMAudio.mmaudio.eval_utils import setup_eval_logging
|
16 |
|
17 |
+
# download model
|
18 |
+
os.makedirs("pretrained/mllm", exist_ok=True)
|
19 |
+
from huggingface_hub import snapshot_download
|
20 |
+
repo_local_path = snapshot_download(repo_id="lym0302/VideoLLaMA2.1-7B-AV-CoT", cache_dir='pretrained/mllm')
|
21 |
+
|
22 |
+
remove_vo_model_dir = "pretrained/remove_vo/checkpoints"
|
23 |
+
os.makedirs(remove_vo_model_dir, exist_ok=True)
|
24 |
+
urls = ["https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/model_bs_roformer_ep_317_sdr_12.9755.ckpt",
|
25 |
+
"https://raw.githubusercontent.com/ZFTurbo/Music-Source-Separation-Training/main/configs/viperx/model_bs_roformer_ep_317_sdr_12.9755.yaml"]
|
26 |
+
for url in urls:
|
27 |
+
file_name = url.split("/")[-1] # Extract file name from URL
|
28 |
+
file_path = os.path.join(remove_vo_model_dir, file_name)
|
29 |
+
response = requests.get(url, stream=True)
|
30 |
+
if response.status_code == 200:
|
31 |
+
with open(file_path, "wb") as f:
|
32 |
+
for chunk in response.iter_content(chunk_size=8192): # Use a chunk size of 8 KB
|
33 |
+
f.write(chunk)
|
34 |
+
print(f"File downloaded successfully and saved to {file_path}")
|
35 |
+
else:
|
36 |
+
print(f"Failed to download the file. Status code: {response.status_code}")
|
37 |
+
|
38 |
+
os.makedirs("pretrained/v2a/mmaudio", exist_ok=True)
|
39 |
|
40 |
|
41 |
setup_eval_logging()
|